From 0ebd4f22c52c32564dddfd4c867925e8aa6b25e1 Mon Sep 17 00:00:00 2001 From: kennyj Date: Tue, 26 Jun 2012 02:40:06 +0900 Subject: Change the behavior of db:test:prepare task when schema_format is sql for consistency. --- railties/test/application/rake_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'railties/test/application') diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 7e33c80a12..6bb50fea19 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -153,6 +153,15 @@ module ApplicationTests assert_match(/Execute db:test:clone_structure/, output) end + def test_db_test_prepare_when_using_sql_format + add_to_config "config.active_record.schema_format = :sql" + output = Dir.chdir(app_path) do + `rails generate scaffold user username:string; + bundle exec rake db:migrate db:test:clone 2>&1 --trace` + end + assert_match(/Execute db:test:load_structure/, output) + end + def test_rake_dump_structure_should_respect_db_structure_env_variable Dir.chdir(app_path) do # ensure we have a schema_migrations table to dump -- cgit v1.2.3