spec/acceptance/support/database_cleaner.rb in ts-sidekiq-delta-0.3.0 vs spec/acceptance/support/database_cleaner.rb in ts-sidekiq-delta-0.4.0
- old
+ new
@@ -1,11 +1,9 @@
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
end
- config.after(:each) do
- if example.example_group_instance.class.metadata[:live]
- DatabaseCleaner.clean
- end
+ config.after(:each, :live) do
+ DatabaseCleaner.clean
end
end