Module: ActionController::Testing

Extended by:
ActiveSupport::Concern
Includes:
RackDelegation
Defined in:
actionpack/lib/action_controller/metal/testing.rb

Defined Under Namespace

Modules: ClassMethods, Functional

Instance Method Summary collapse

Methods included from ActiveSupport::Concern

append_features, extended, included

Methods included from RackDelegation

#dispatch, #reset_session, #response_body=

Instance Method Details

#headers=(new_headers) ⇒ Object

TODO : Rewrite tests using controller.headers= to use Rack env



8
9
10
11
# File 'actionpack/lib/action_controller/metal/testing.rb', line 8

def headers=(new_headers)
  @_response ||= ActionDispatch::Response.new
  @_response.headers.replace(new_headers)
end