diff options
-rw-r--r-- | actionpack/lib/system_test_case.rb | 5 | ||||
-rw-r--r-- | railties/lib/rails/test_help.rb | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/lib/system_test_case.rb b/actionpack/lib/system_test_case.rb new file mode 100644 index 0000000000..fdaae3ff40 --- /dev/null +++ b/actionpack/lib/system_test_case.rb @@ -0,0 +1,5 @@ +module Rails + class SystemTestCase < ActiveSupport::TestCase + include Rails.application.routes.url_helpers + end +end diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index 0f9bf98737..468b50c0f8 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 'system_test_case' require "rails/generators/test_case" require "active_support/testing/autorun" @@ -44,3 +45,10 @@ class ActionDispatch::IntegrationTest super end end + +class Rails::SystemTestCase + def before_setup # :nodoc: + @routes = Rails.application.routes + super + end +end |