Displaying 3 results from an estimated 3 matches for "ivarproxy".
2006 Nov 21
1
assigns in trunk
...gives the error:
wrong number of arguments (1 for 0)
./spec/controllers/customers_controller_spec.rb:23:in `assigns''
In the rspec rails plugin trunk (revision 1126), in /lib/spec/rails/
context/controller.rb, assigns is defined as:
def assigns
@ivar_proxy ||= Spec::Rails::IvarProxy.new @controller
end
whereas if i get the tagged version for 0_7_2 it was defined thus:
def assigns(key=nil)
return assigns[key] unless key.nil?
@ivar_proxy ||= Test::Rails::IvarProxy.new(controller)
end
So, if I change the code in my spec to
assigns[:customer].should =...
2007 Apr 05
3
Extending assigns in controller specs?
Hello,
I am interested in enhancing assigns in controller specs to do
things like the following
assigns[:key1, :key2, :key3] #=> vals for keys
Is there away to "break open" this construction to overload the :[] operator?
Thanks.
-Chris
2007 Apr 13
0
ANN 0.9-beta-2
...lighted snippet of the source
code where the spec failed (needs the syntax gem)
* Added [#9735] support flexmock (thanks to Jim Weirich for his
modifications to flexmock to support this)
* Spec::Rails controller specs will no longer let mock exception
ripple through to the response.
* Fixed [#9260] IvarProxy does not act like a hash.
* Applied [#9458] The rspec_resource generator does not take into
account class nesting (Patch from Steve Tendon)
* Applied [#9132] Rakefile spec:doc can fail without preparing
database (Patch from Steve Ross)
* Applied [#9678] Custom runner command line switch, and
multi-...