1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Clear dirty schema_cache after dump_schema_cache

`dump_schema_cache` fills `schema_cache` even if the test that modifies
the schema has properly cleared the schema cache.

Fixes #31463.
This commit is contained in:
Ryuta Kamizono 2017-12-15 12:33:59 +09:00
parent 48fbc4aec8
commit 377948850f

View file

@ -110,6 +110,7 @@ module ActiveRecord
ActiveRecord::Tasks::DatabaseTasks.dump_schema_cache(ActiveRecord::Base.connection, path)
assert File.file?(path)
ensure
ActiveRecord::Base.clear_cache!
FileUtils.rm_rf(path)
end
end