Invalidate cache before cleaning db in tests after context

This commit is contained in:
Grzegorz Bizon 2017-08-23 11:28:52 +02:00
parent 78a0d27e98
commit 72018278a4
1 changed files with 3 additions and 3 deletions

View File

@ -4,18 +4,18 @@ RSpec.configure do |config|
end
config.append_after(:context) do
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.clean_with(:truncation, cache_tables: false)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, js: true) do
config.before(:each, :js) do
DatabaseCleaner.strategy = :truncation
end
config.before(:each, truncate: true) do
config.before(:each, :truncate) do
DatabaseCleaner.strategy = :truncation
end