For tests we have the `fixtures :all`. But for other usages fixture loading is idiotically hard…
Fixtures.create_fixtures(folder, file) should just load all when no file is given, but alas we have to do this ourselves…
#Load all fixtures Fixtures.reset_cache #only needed when you reload them fixtures_folder = File.join(RAILS_ROOT, 'spec', 'fixtures') fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } Fixtures.create_fixtures(fixtures_folder, fixtures)
One thought on “Load All Fixtures (when not in test…)”