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.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 5fda160012..75171f2395 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -7,6 +7,7 @@ require "active_support/test_case"
require "action_controller"
require "action_controller/test_case"
require "action_dispatch/testing/integration"
+require "action_dispatch/system_test_case"
require "rails/generators/test_case"
require "active_support/testing/autorun"
@@ -14,10 +15,12 @@ require "active_support/testing/autorun"
if defined?(ActiveRecord::Base)
ActiveRecord::Migration.maintain_test_schema!
- class ActiveSupport::TestCase
- include ActiveRecord::TestFixtures
- self.fixture_path = "#{Rails.root}/test/fixtures/"
- self.file_fixture_path = fixture_path + "files"
+ module ActiveSupport
+ class TestCase
+ include ActiveRecord::TestFixtures
+ self.fixture_path = "#{Rails.root}/test/fixtures/"
+ self.file_fixture_path = fixture_path + "files"
+ end
end
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
@@ -27,6 +30,8 @@ if defined?(ActiveRecord::Base)
end
end
+# :enddoc:
+
class ActionController::TestCase
def before_setup # :nodoc:
@routes = Rails.application.routes
@@ -40,3 +45,10 @@ class ActionDispatch::IntegrationTest
super
end
end
+
+class ActionDispatch::SystemTestCase
+ def before_setup # :nodoc:
+ @routes = Rails.application.routes
+ super
+ end
+end