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.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index f9aa018cab..2ed5353755 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -1,6 +1,6 @@
# Make double-sure the RAILS_ENV is set to test,
# so fixtures are loaded to the right database
-exit("Abort testing: Your Rails environment is not running in test mode!") unless Rails.env.test?
+abort("Abort testing: Your Rails environment is not running in test mode!") unless Rails.env.test?
require 'test/unit'
require 'active_support/core_ext/kernel/requires'
@@ -24,6 +24,16 @@ if defined?(ActiveRecord)
end
end
+class ActionController::TestCase
+ setup do
+ @router = Rails.application.routes
+ end
+end
+
+class ActionDispatch::IntegrationTest
+ include Rails.application.routes.url_helpers
+end
+
begin
require_library_or_gem 'ruby-debug'
Debugger.start