| Class | Spec::Rails::Example::FunctionalExampleGroup |
| In: |
lib/spec/rails/example/functional_example_group.rb
|
| Parent: | RailsExampleGroup |
| request | [R] | |
| response | [R] |
Hash of instance variables to values that are made available to views. == Examples
#in thing_controller.rb
def new
@thing = Thing.new
end
#in thing_controller_spec
get 'new'
assigns[:registration].should == Thing.new
# File lib/spec/rails/example/functional_example_group.rb, line 49
49: def assigns(key = nil)
50: if key.nil?
51: _assigns_hash_proxy
52: else
53: _assigns_hash_proxy[key]
54: end
55: end
# File lib/spec/rails/example/functional_example_group.rb, line 23
23: def flash
24: response.flash
25: end