diff options
author | kennyj <kennyj@gmail.com> | 2012-03-01 01:19:27 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-03-01 01:19:27 +0900 |
commit | 5cbba30a1292dde9c83ab42287c2a1f38f3fcc44 (patch) | |
tree | a016ec1cf6dd9d90e449b8be7a06b6fdd70ee5cb /railties/test/application | |
parent | 0da12df2608969330bd47c543866f79ff8ca9edd (diff) | |
download | rails-5cbba30a1292dde9c83ab42287c2a1f38f3fcc44.tar.gz rails-5cbba30a1292dde9c83ab42287c2a1f38f3fcc44.tar.bz2 rails-5cbba30a1292dde9c83ab42287c2a1f38f3fcc44.zip |
Support judgement expired schema cache dump.
Diffstat (limited to 'railties/test/application')
-rw-r--r-- | railties/test/application/initializers/frameworks_test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/railties/test/application/initializers/frameworks_test.rb b/railties/test/application/initializers/frameworks_test.rb index d8012eed64..a0e88cd0f0 100644 --- a/railties/test/application/initializers/frameworks_test.rb +++ b/railties/test/application/initializers/frameworks_test.rb @@ -205,5 +205,19 @@ module ApplicationTests assert ActiveRecord::Base.connection.schema_cache.tables["posts"] end + test "expire schema cache dump" do + Dir.chdir(app_path) do + `rails generate model post title:string` + `bundle exec rake db:migrate` + `bundle exec rake db:schema:cache:dump` + + `bundle exec rake db:rollback` + end + silence_warnings { + require "#{app_path}/config/environment" + assert !ActiveRecord::Base.connection.schema_cache.tables["posts"] + } + end + end end |