diff options
Diffstat (limited to 'railties/lib/rails/test_help.rb')
-rw-r--r-- | railties/lib/rails/test_help.rb | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index aed7fd4b14..c837fadb40 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -2,26 +2,22 @@ # so fixtures aren't loaded into that environment abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production? -require 'minitest/autorun' +require 'active_support/testing/autorun' require 'active_support/test_case' +require 'action_controller' require 'action_controller/test_case' require 'action_dispatch/testing/integration' +require 'rails/generators/test_case' # Config Rails backtrace in tests. require 'rails/backtrace_cleaner' -MiniTest.backtrace_filter = Rails.backtrace_cleaner - -# Enable turn if it is available -begin - require 'turn' - - Turn.config do |c| - c.natural = true - end -rescue LoadError +if ENV["BACKTRACE"].nil? + Minitest.backtrace_filter = Rails.backtrace_cleaner end if defined?(ActiveRecord::Base) + ActiveRecord::Migration.maintain_test_schema! + class ActiveSupport::TestCase include ActiveRecord::TestFixtures self.fixture_path = "#{Rails.root}/test/fixtures/" |