aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/test_help.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/test_help.rb')
-rw-r--r--railties/lib/rails/test_help.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 2e6356343d..5cc1b5b219 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -2,17 +2,14 @@
# so fixtures aren't loaded into that environment
abort("Abort testing: Your Rails environment is running in production mode!") if Rails.env.production?
-require 'active_support/testing/autorun'
+require "rails/test_unit/minitest_plugin"
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'
-if ENV["BACKTRACE"].nil?
- Minitest.backtrace_filter = Rails.backtrace_cleaner
-end
+require 'active_support/testing/autorun'
if defined?(ActiveRecord::Base)
ActiveRecord::Migration.maintain_test_schema!
@@ -20,6 +17,7 @@ if defined?(ActiveRecord::Base)
class ActiveSupport::TestCase
include ActiveRecord::TestFixtures
self.fixture_path = "#{Rails.root}/test/fixtures/"
+ self.file_fixture_path = self.fixture_path + "files"
end
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
@@ -30,13 +28,15 @@ if defined?(ActiveRecord::Base)
end
class ActionController::TestCase
- setup do
+ def before_setup # :nodoc:
@routes = Rails.application.routes
+ super
end
end
class ActionDispatch::IntegrationTest
- setup do
+ def before_setup # :nodoc:
@routes = Rails.application.routes
+ super
end
end