Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Silence warning: instance variable @controller not initialized

  • Loading branch information...
commit 17fda24523f05a9cd5bc5115fd00cf55e33c0b4a 1 parent a3ab2b0
@brynary brynary authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 actionpack/lib/action_controller/test_case.rb
View
7 actionpack/lib/action_controller/test_case.rb
@@ -105,6 +105,11 @@ module ActionController
class TestCase < ActiveSupport::TestCase
include TestProcess
+ def initialize(*args)
+ super
+ @controller = nil
+ end
+
module Assertions
%w(response selector tag dom routing model).each do |kind|
include ActionController::Assertions.const_get("#{kind.camelize}Assertions")
@@ -195,7 +200,7 @@ def setup_controller_request_and_response
@controller.send(:initialize_current_url)
end
end
-
+
# Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local
def rescue_action_in_public!
@request.remote_addr = '208.77.188.166' # example.com
Please sign in to comment.
Something went wrong with that request. Please try again.