[rspec-users] Cucumber vs Rails Fixtures

Wolfram Arnold lists at ruby-forum.com
Sun Jun 7 13:47:42 EDT 2009

Yi Wen wrote:
> I do this:
> Fixtures.reset_cache
> fixtures_folder = File.join(RAILS_ROOT, 'test', 'fixtures')
> fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f|
> File.basename(f, '.yml') }
> fixture_class_names = {} # or whatever needed
> Fixtures.create_fixtures(fixtures_folder, fixtures, fixture_class_names)

Sure, that'll load fixtures and let you access them, e.g. with:


What I wanted is to be able to access fixtures with:


Hence all the heavy lifting.  It works now as described on the github 
wiki page.
Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list