/ rspec

Faster Specs with FixtureBuilder

What is [fixture_builder][1] ?

Fixture Builder creates fixtures based on your definitions of [FactoryGirl][2]

Why fixture_builder ?

In projects with huge test suite, its possible that the creation of AR objects hinders the test performance.

So to gain performance, we can avoid the redundant database transaction by building subsequent fixtures.

Examples

https://github.com/rdy/fixture_builder#example

It gives tremendous boost to your test execution time.

For us the statistics for 550 test cases were :

Before fixture_builder ~ 2.5 hours

After fixture_builder ~ 19.37 minutes

Note : This should be backed up by proper [DatabaseCleaner][3] settings
[1]: https://github.com/rdy/fixture_builder
[2]: https://github.com/thoughtbot/factory_girl
[3]: https://github.com/bmabey/database_cleaner