Commit 2838a993 authored by Jeroen van Baarsen's avatar Jeroen van Baarsen

DB cleaner reverted to a known working version

Signed-off-by: default avatarJeroen van Baarsen <jeroenvanbaarsen@gmail.com>
parent 7cf1a425
RSpec.configure do |config| # RSpec.configure do |config|
config.around(:each) do |example| # config.around(:each) do |example|
DatabaseCleaner.strategy = :transaction # DatabaseCleaner.strategy = :transaction
# DatabaseCleaner.clean_with(:truncation)
# DatabaseCleaner.cleaning do
# example.run
# end
# end
# config.around(:each, js: true) do |example|
# DatabaseCleaner.strategy = :truncation
# DatabaseCleaner.clean_with(:truncation)
# DatabaseCleaner.cleaning do
# example.run
# end
# end
# end
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:truncation) DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.cleaning do
example.run
end end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end end
config.around(:each, js: true) do |example| config.before(:each, :js => true) do
DatabaseCleaner.strategy = :truncation DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean_with(:truncation)
DatabaseCleaner.cleaning do
example.run
end end
config.before(:each) do
DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment