aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2014-01-02 10:05:46 -0800
committerJon Leighton <j@jonathanleighton.com>2014-01-02 10:05:46 -0800
commitd74043885a8e7436091cca13e694fc255cb375b6 (patch)
tree5ad6aed8ee454c320967d767229debde268da2e2 /railties/lib/rails
parenta1d0c0fa3d8ca97edc8f2a1d6ba96af19221dbad (diff)
parentff7ab3bc78abc3e8439a57ef7d755c5aa5b069f4 (diff)
downloadrails-d74043885a8e7436091cca13e694fc255cb375b6.tar.gz
rails-d74043885a8e7436091cca13e694fc255cb375b6.tar.bz2
rails-d74043885a8e7436091cca13e694fc255cb375b6.zip
Merge pull request #13528 from jonleighton/maintain_test_schema
Automatically maintain test database schema
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/test/test_helper.rb2
-rw-r--r--railties/lib/rails/test_help.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb
index 4fd060341e..4ade1a0bdc 100644
--- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb
+++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb
@@ -4,8 +4,6 @@ require 'rails/test_help'
class ActiveSupport::TestCase
<% unless options[:skip_active_record] -%>
- ActiveRecord::Migration.check_pending!
-
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 7765c9ae86..2e6356343d 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -15,6 +15,8 @@ if ENV["BACKTRACE"].nil?
end
if defined?(ActiveRecord::Base)
+ ActiveRecord::Migration.maintain_test_schema!
+
class ActiveSupport::TestCase
include ActiveRecord::TestFixtures
self.fixture_path = "#{Rails.root}/test/fixtures/"