Answers for "rspec rails assert destroy"

0

rails rspec destroy data after each test

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
Posted by: Guest on June-09-2021

Browse Popular Code Answers by Language