Including ALL fixtures for a test

I am running into some issues with my functional tests because they need
info from almost every single table in the database. I have long
laundry lists of fixture names to include on these test files and then I
have to troubleshooot bizarre test failures because of a fixture that
was not included.

So is there a way to simply include all fixtures in a test? Something
like:

fixtures :all

would rock my socks, but doesn’t work. Is there a way to include all
fixtures?

If you want all fixtures to be loaded for all tests specifiy them in
test/test_helper.rb

class Test::Unit::TestCase
fixtures :people # all your fixtures here
end

Then you won’t need a call to fixtures in your test classes.

-Jonathan.

Jonathan V. wrote:

If you want all fixtures to be loaded for all tests specifiy them in
test/test_helper.rb

class Test::Unit::TestCase
fixtures :people # all your fixtures here
end

Then you won’t need a call to fixtures in your test classes.

-Jonathan.

Well not finding a satisfactory solution, I decided to roll my own
plugin.

http://beautifulpixel.com/articles/2006/08/04/all-fixtures-plugin

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