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)

1 comment
Comments feed for this article
December 25, 2008 at 14:38
Getting Started with Cucumber on Ubuntu « My Pragmatig life
[...] FrameworkNo More Whitespace Worries — Use HAML for Emails!Autotest RSpec Notifications for UbuntuLoad All Fixtures (when not in test…)Testing a single Example; Spec; Testcase; TestRubygem 1.2 is Broken, Update to Rubygems 1.3 [...]