I’ve added several specs as part of a new feature I’m adding. One example tests to make sure that if an option in one field is selected that another field must have data. The test passes when run in it’s feature group or when run singly. However, it fails when run in the full test suite.
I’ve got DatabaseCleaner setup and it’s always seemed to work correctly… here’s the consifuration in spec/support/database_cleaner.rb:
RSpec.configure do |config| # From Avdi Grimm: http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/ config.before(:suite) do DatabaseCleaner.clean_with(:truncation) end config.before(:each) do DatabaseCleaner.strategy = :transaction end config.before(:each, :js => true) do DatabaseCleaner.strategy = :truncation end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end end
I tried taking out the spec that ran just before it in the full deck (215 examples) but that didn’t solve the problem.
Any suggestions as to what else to look for to resolve this? Thanks.