diff options
author | eileencodes <eileencodes@gmail.com> | 2016-08-05 09:58:43 -0400 |
---|---|---|
committer | eileencodes <eileencodes@gmail.com> | 2017-02-20 15:07:31 -0500 |
commit | 97d8b7abfe75b6a7617966ad0b3d37ae9fc7adb8 (patch) | |
tree | 0fa6d4a5270ce39a2f02337681e53db9ef491889 | |
parent | 5b9aa43bc8dafcc2a00eb43741c495262f5ca45e (diff) | |
download | rails-97d8b7abfe75b6a7617966ad0b3d37ae9fc7adb8.tar.gz rails-97d8b7abfe75b6a7617966ad0b3d37ae9fc7adb8.tar.bz2 rails-97d8b7abfe75b6a7617966ad0b3d37ae9fc7adb8.zip |
Add skeleton for Rails::SystemTestCase
This skelton is the bare minimum to get system tests to actually run in
an application. This of course doesn't yet actually run a test but it is
enough for `bin/rails test:system` to attempt to run files in
`test/system` that inherit from `Rails::SystemTestCase`.
-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 |