Load All Fixtures
Join the DZone community and get the full member experience.Join For Free
In some test cases I need all my fixtures to be loaded. To make this easier, add the following to test/test_helper.rb:
class Test::Unit::TestCase def self.all_fixtures Dir[File.dirname(__FILE__) + "/fixtures/*.yml"].each do |f| fixtures File.basename(f, '.yml') end end .. endand in your tests use it as follows:
class FooTest < Test::Unit::TestCase all_fixtures .. endHappy testing!