search for: contextevalmodule

Displaying 3 results from an estimated 3 matches for "contextevalmodule".

2007 Apr 12
1
rspec on rails: undefined method ''controller_name''
...et the error no matter how I run the spec ( whether I use rake or not) Any ideas? I am using 0.8.2 The Error: C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2/lib/spec/expectati ons/sugar.rb:14:in `call'': undefined method `controller_name'' for #<Spec::Runner ::ContextEvalModule:0x35e6a98> (NoMethodError) from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec- 0.8.2 /lib/s pec/expectations/sugar.rb:14:in `_method_missing'' from C:/rails/InstantRails/ruby/lib/ruby/gems/1.8/gems/rspec-0.8.2 /lib/s pec/expectations/sugar.rb:10:in `method_missi...
2007 Feb 15
4
defining context(s) dynamically
...troller_spec.rb file.<br> <br> But if I move the exact same code to a helper file and require it, spec gets confused:<br> <br> <tt>.../rspec-0.7.5.1/lib/spec/expectations/sugar.rb:13:in `call'': undefined method `controller_name'' for #<Spec::Runner::ContextEvalModule:0xb70496a8> (NoMethodError)<br> &nbsp;... etc etc...<br> </tt><br> Clearly, there''s some magic involved which means the context does not know what it''s about (it was at this point in typing my original plea for help that I remembered seeing the :cont...
2007 Apr 11
10
DRYer controller specs
...ntext that has access to the appropriate context methods (assigns, response, session, etc). I get errors like the following: NameError in ''GET /controller/action/1234 should render the foobar template'' undefined local variable or method `response'' for #<Spec::Runner::ContextEvalModule:0xb6def95c> (Usually the "expect_that_it" blocks work fine, because they aren''t dependent on anything that is specific to their EvalContext.) Does someone know how I could get this working? I also thought about making an alias for setup called "given" and instead...