File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,3 +17,4 @@ coverage/*
1717.floo
1818.byebug_history
1919tmp /*
20+ test /storage /test.sqlite3 *
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class TestCase < ActiveSupport::TestCase
2727
2828 setup :ensure_clean_rails_env
2929 setup :remove_backtrace_silencers
30+ setup :cleanup_sqlite_databases
3031
3132 private
3233
@@ -37,6 +38,12 @@ def ensure_clean_rails_env
3738 def remove_backtrace_silencers
3839 Rails . backtrace_cleaner . remove_silencers!
3940 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
4047
4148 def host_windows?
4249 RbConfig ::CONFIG [ "host_os" ] =~ /mswin|mingw/
You can’t perform that action at this time.
0 commit comments