aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorAndrew White <pixeltrix@users.noreply.github.com>2017-05-01 20:15:56 +0100
committerGitHub <noreply@github.com>2017-05-01 20:15:56 +0100
commitaaf99e3cfc7064e7188fad62386f4e6f897df783 (patch)
treebf1060cdf1dd9c8853d458d0b5a4090349a59cec /railties/lib
parentbee7b06597db63926690cf0d740383d151514e2a (diff)
parent40d3bbee9935a59fe68020b2f03bef9540c2d7c3 (diff)
downloadrails-aaf99e3cfc7064e7188fad62386f4e6f897df783.tar.gz
rails-aaf99e3cfc7064e7188fad62386f4e6f897df783.tar.bz2
rails-aaf99e3cfc7064e7188fad62386f4e6f897df783.zip
Merge pull request #28939 from kirs/maintain_test_schema_friendly
Friendly maintain schema error in test runner
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/test_help.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 0f9bf98737..81537d813e 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -12,7 +12,12 @@ require "rails/generators/test_case"
require "active_support/testing/autorun"
if defined?(ActiveRecord::Base)
- ActiveRecord::Migration.maintain_test_schema!
+ begin
+ ActiveRecord::Migration.maintain_test_schema!
+ rescue ActiveRecord::PendingMigrationError => e
+ puts e.to_s.strip
+ exit 1
+ end
module ActiveSupport
class TestCase