From f4f9ec153685d3a672588c5f5db85658a7fb6f76 Mon Sep 17 00:00:00 2001 From: kennyj Date: Sun, 18 Mar 2012 14:19:30 +0900 Subject: Fix GH #5435. db:structure:dump should be re-enable. --- railties/test/application/rake_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'railties/test') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 1d90671e44..4b39c7f5bc 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -138,5 +138,17 @@ module ApplicationTests end 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 end end -- cgit v1.2.3