A way to stop some fixtures from loading for certain tests?

I am using Rails 3. Is there a way to stop a fixture from loading for
certain test cases?

Regards,
Don Mc

It seems like best practice is to use a factory gem like factory_girl
instead of fixtures. Easily getting different data for different tests
is one of the benefits of such an approach.

Best Wishes,
Peter

On 3 March 2011 18:03, Peter B. [email protected] wrote:

It seems like best practice is to use a factory gem like factory_girl instead of
fixtures. Easily getting different data for different tests is one of the benefits
of such an approach.

+1

You don’t need to chuck everything out and start again however. For
the tests that are giving you the problem at the moment start using a
factory (I like machinist rather than factory_girl but it is a matter
of personal preference) instead of the fixtures and as you add new
tests or need to change old ones then do the same. There is no
problem keeping the fixtures for the existing tests.

Colin