diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-17 21:50:37 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-03-17 21:50:37 -0700 |
commit | 2b5cb1cd41ea765ae665321236c83c9d0128636b (patch) | |
tree | b4cd7f809c96ddb97855c4cd25bd5cefb7f63eb5 /railties | |
parent | c513ae36e0b4054d4671e2e5a76a8a4d7e436b40 (diff) | |
parent | 0360b3eb1f64128cfaa6c4eeb20e624f51e41ecf (diff) | |
download | rails-2b5cb1cd41ea765ae665321236c83c9d0128636b.tar.gz rails-2b5cb1cd41ea765ae665321236c83c9d0128636b.tar.bz2 rails-2b5cb1cd41ea765ae665321236c83c9d0128636b.zip |
Merge pull request #5486 from kennyj/fix_5435
Fix GH #5435. db:structure:dump should be re-enable.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/application/rake_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index b6cbb10141..27d521485c 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -140,6 +140,18 @@ module ApplicationTests assert File.exists?(File.join(app_path, 'db', 'my_structure.sql')) end + def test_rake_dump_structure_should_be_called_twice_when_migrate_redo + add_to_config "config.active_record.schema_format = :sql" + + output = Dir.chdir(app_path) do + `rails g model post title:string; + bundle exec rake db:migrate:redo 2>&1 --trace;` + end + + # expect only Invoke db:structure:dump (first_time) + assert_no_match(/^\*\* Invoke db:structure:dump\s+$/, output) + end + def test_rake_dump_schema_cache Dir.chdir(app_path) do `rails generate model post title:string; |