Skip to content

Commit

Permalink
Silence warning: instance variable @controller not initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 9, 2009
1 parent a3ab2b0 commit 17fda24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion actionpack/lib/action_controller/test_case.rb
Expand Up @@ -105,6 +105,11 @@ module ActionController
class TestCase < ActiveSupport::TestCase class TestCase < ActiveSupport::TestCase
include TestProcess include TestProcess


def initialize(*args)
super
@controller = nil
end

module Assertions module Assertions
%w(response selector tag dom routing model).each do |kind| %w(response selector tag dom routing model).each do |kind|
include ActionController::Assertions.const_get("#{kind.camelize}Assertions") include ActionController::Assertions.const_get("#{kind.camelize}Assertions")
Expand Down Expand Up @@ -195,7 +200,7 @@ def setup_controller_request_and_response
@controller.send(:initialize_current_url) @controller.send(:initialize_current_url)
end end
end end

# Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local # 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! def rescue_action_in_public!
@request.remote_addr = '208.77.188.166' # example.com @request.remote_addr = '208.77.188.166' # example.com
Expand Down

0 comments on commit 17fda24

Please sign in to comment.