diff options
author | kennyj <kennyj@gmail.com> | 2012-03-01 01:01:12 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-03-01 01:01:12 +0900 |
commit | 0150a212c068c6e4a580218913f44f278e086bd3 (patch) | |
tree | 10818848e9a5c3682f4f8c243d03536601e3671d /railties | |
parent | 5ca4fc95818047108e69e22d200e7a4a22969477 (diff) | |
download | rails-0150a212c068c6e4a580218913f44f278e086bd3.tar.gz rails-0150a212c068c6e4a580218913f44f278e086bd3.tar.bz2 rails-0150a212c068c6e4a580218913f44f278e086bd3.zip |
Add db:schema:cache:dump and db:schema:cache:clear tasks.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake_test.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index ff12b3e9fc..9515e40b6e 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -138,5 +138,24 @@ module ApplicationTests end assert File.exists?(File.join(app_path, 'db', 'my_structure.sql')) end + + def test_rake_dump_schema_cache + Dir.chdir(app_path) do + `rails generate model post title:string` + `rails generate model product name:string` + `bundle exec rake db:migrate` + `bundle exec rake db:schema:cache:dump` + end + assert File.exists?(File.join(app_path, 'db', 'schema_cache.dump')) + end + + def test_rake_clear_schema_cache + Dir.chdir(app_path) do + `bundle exec rake db:schema:cache:dump` + `bundle exec rake db:schema:cache:clear` + end + assert !File.exists?(File.join(app_path, 'db', 'schema_cache.dump')) + end + end end |