Skip to content

Commit

Permalink
Don't drop_table before schema cache tests
Browse files Browse the repository at this point in the history
Since 5cab344, `drop_table` clears schema cache.
  • Loading branch information
kamipo committed Jun 13, 2019
1 parent 5cab344 commit 75eb3d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion railties/test/application/initializers/frameworks_test.rb
Expand Up @@ -218,8 +218,9 @@ def show
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
Expand Down

0 comments on commit 75eb3d0

Please sign in to comment.