Preload test data from factory_girl

Is there a way to preload common data made by factory_girl to speed up
tests instead of recreating these common data at the beginning of
every test. For example, I want to have 10 users premade at the
beginning of every test.

I found this
http://agilewebdevelopment.com/plugins/factory_data_preloader
But the page says that this plugin does not “play nice” with
autotest. But I use autotest. Is there another solution?

Thanks.

Learn by Doing wrote:

Is there a way to preload common data made by factory_girl to speed up
tests instead of recreating these common data at the beginning of
every test. For example, I want to have 10 users premade at the
beginning of every test.

No, you probably don’t. Factories aren’t fixtures and shouldn’t be used
in the same way.

I found this
http://agilewebdevelopment.com/plugins/factory_data_preloader
But the page says that this plugin does not “play nice” with
autotest. But I use autotest. Is there another solution?

Use factories correctly. Don’t try to prematurely optimize your tests.

Thanks.

Best,
–Â
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thanks Marnen. I’ll heed your advice.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs