diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-13 13:41:57 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-06-13 13:43:26 +0900 |
commit | 75eb3d0cec389c9e288968b46f19bd17b5feec41 (patch) | |
tree | 6f5c2d7b9ab6846dace90b82935aa08a353fa3aa /railties | |
parent | 5cab344494c340ea82a35b46efa06b94f0b7730b (diff) | |
download | rails-75eb3d0cec389c9e288968b46f19bd17b5feec41.tar.gz rails-75eb3d0cec389c9e288968b46f19bd17b5feec41.tar.bz2 rails-75eb3d0cec389c9e288968b46f19bd17b5feec41.zip |
Don't `drop_table` before schema cache tests
Since 5cab34449, `drop_table` clears schema cache.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index a35247fc43..05978e1d99 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -218,8 +218,9 @@ module ApplicationTests rails %w(generate model post title:string) rails %w(db:migrate db:schema:cache:dump) require "#{app_path}/config/environment" - ActiveRecord::Base.connection.drop_table("posts") # force drop posts table for test. assert ActiveRecord::Base.connection.schema_cache.data_sources("posts") + ensure + ActiveRecord::Base.connection.drop_table("posts", if_exists: true) # force drop posts table for test. end test "expire schema cache dump" do |