I've 2 _spec files: the first containing unit test, the other one some integration tests.
While running them by specifying file name they are alle green, while running them as "rspec" 3 of them are failing.
I'm using database_cleaner gem to clean test db around each test.
config.use_transactional_fixtures = false
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end
I'm using "let" to instantiate objects and FactoryGirl to create sample objects.
Has anyone experienced something like this before?
Aucun commentaire:
Enregistrer un commentaire