I have a bunch of fixtures designed to populate the database for my Cucumber 
integration tests.

But at this stage I want my database to be empty when using Rspec.

So, I moved the fixtures from `/spec/fixtures` to 
`features/support/fixtures`, and updated `features/support/env.rb` to read:

    Fixtures.reset_cache  
    fixtures_folder = File.join(RAILS_ROOT, 'features', 'support', 
'fixtures')
    fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| 
File.basename(f, '.yml') }
    Fixtures.create_fixtures(fixtures_folder, fixtures)

So far so good. Cucumber still loads the fixtures I moved as planned.

But Rspec is still loading them too! This is despite `spec/spec_helper.rb` 
saying:

      config.fixture_path = "#{::Rails.root}/spec/fixtures"

I have tried setting the following in `spec/spec_helper.rb`: 

      config.use_transactional_fixtures = false

However, it doesn't work. And it wouldn't be a long-term solution anyway, as 
I may need fixtures in Rspec in the future.

How can I fix this?

(Cross-posted from StackOverflow where there was no response.)
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to