From 310fc8dc68279a071b1e987beb22bcde0e8b76ea Mon Sep 17 00:00:00 2001 From: Andrew Kvalheim Date: Sun, 5 Apr 2020 11:16:15 -0700 Subject: [PATCH] Fix bug in test database preparation Presumably the intent of this was to clear the database and repopulate it with seed data. `transaction` isn't the right strategy for this; it just rolls back any existing transactions. --- spec/support/database_cleaner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb index c9d3073b..651e1474 100644 --- a/spec/support/database_cleaner.rb +++ b/spec/support/database_cleaner.rb @@ -2,7 +2,7 @@ RSpec.configure do |config| config.before(:suite) do - DatabaseCleaner.clean_with(:transaction) + DatabaseCleaner.clean_with(:truncation) Rails.application.load_seed end