diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-06-10 02:33:14 -0700 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-06-10 02:33:14 -0700 |
commit | 4845c0685aa3983b4685d4afe141ac5d398521bc (patch) | |
tree | 76ad4b6c69694928f8d7aa920e388f19cbbbdf0f /railties/test | |
parent | fdcc252e81629eb2d142da32d47037fc5cf4030d (diff) | |
parent | d741a4c6f863778c5ebf04b21f6c3292091c13a7 (diff) | |
download | rails-4845c0685aa3983b4685d4afe141ac5d398521bc.tar.gz rails-4845c0685aa3983b4685d4afe141ac5d398521bc.tar.bz2 rails-4845c0685aa3983b4685d4afe141ac5d398521bc.zip |
Merge pull request #6665 from schneems/schneems/raise-migration-error
Notify A User they Have Pending Migrations
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/application/configuration_test.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb index de864e08ec..75190372ab 100644 --- a/railties/test/application/configuration_test.rb +++ b/railties/test/application/configuration_test.rb @@ -41,6 +41,21 @@ module ApplicationTests FileUtils.rm_rf(new_app) if File.directory?(new_app) end + test "a renders exception on pending migration" do + add_to_config <<-RUBY + config.active_record.migration_error = :page_load + config.consider_all_requests_local = true + config.action_dispatch.show_exceptions = true + RUBY + + require "#{app_path}/config/environment" + ActiveRecord::Migrator.stubs(:needs_migrations?).returns(true) + + get "/foo" + assert_equal 500, last_response.status + assert_match "ActiveRecord::PendingMigrationError", last_response.body + end + test "multiple queue construction is possible" do require 'rails' require "#{app_path}/config/environment" |