aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2017-04-30 17:58:42 -0400
committerKir Shatrov <shatrov@me.com>2017-04-30 17:58:50 -0400
commit40d3bbee9935a59fe68020b2f03bef9540c2d7c3 (patch)
tree797d3eca31404e5b5867a0dfd875700498517d1b /railties
parent7cb71c5ce37b7bc599de851d44eaa6a948daec03 (diff)
downloadrails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.tar.gz
rails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.tar.bz2
rails-40d3bbee9935a59fe68020b2f03bef9540c2d7c3.zip
Friendly maintain schema failure
Diffstat (limited to 'railties')
-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