Class: ActionController::TestResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/spec/rails/extensions/action_controller/test_response.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#controller_path=(value) ⇒ Object (writeonly)

Sets the attribute controller_path

Parameters:

  • value

    the value to set the attribute controller_path to.



3
4
5
# File 'lib/spec/rails/extensions/action_controller/test_response.rb', line 3

def controller_path=(value)
  @controller_path = value
end

Instance Method Details

#[](name) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/spec/rails/extensions/action_controller/test_response.rb', line 10

def [](name)
  Kernel.warn <<-WARNING
DEPRECATION NOTICE: [](name) as an alias for capture(name) (TestResponse
extension in rspec-rails) is deprecated and will not be defined by rspec-rails
when working with rails >= 2.3.0. It will also be removed entirely from
a future version of rspec-rails.
WARNING
  capture(name)
end

#capture(name) ⇒ Object



5
6
7
# File 'lib/spec/rails/extensions/action_controller/test_response.rb', line 5

def capture(name)
  template.instance_variable_get "@content_for_#{name.to_s}"
end