File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ coverage/*
17
17
.floo
18
18
.byebug_history
19
19
tmp /*
20
+ test /storage /test.sqlite3 *
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class TestCase < ActiveSupport::TestCase
27
27
28
28
setup :ensure_clean_rails_env
29
29
setup :remove_backtrace_silencers
30
+ setup :cleanup_sqlite_databases
30
31
31
32
private
32
33
@@ -37,6 +38,12 @@ def ensure_clean_rails_env
37
38
def remove_backtrace_silencers
38
39
Rails . backtrace_cleaner . remove_silencers!
39
40
end
41
+
42
+ # Cleanup the SQLite database created by previous runs of the Rails ActiveRecord test suite.
43
+ def cleanup_sqlite_databases
44
+ sqlite_db_dir = File . join ( ARTest ::SQLServer . test_root_sqlserver , "db" )
45
+ Dir . glob ( "#{ sqlite_db_dir } /**" ) . each { |f | File . delete ( f ) }
46
+ end
40
47
41
48
def host_windows?
42
49
RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
You can’t perform that action at this time.
0 commit comments