[rspec-users] Stub a controllers helper_method in a view template helper spec

David Chelimsky dchelimsky at gmail.com
Mon Mar 21 13:29:10 EDT 2011


On Mar 21, 2011, at 11:15 AM, Kai Schlamp wrote:

>>> module ApplicationHelper
>>>  def order_link(column, title = nil)
>>>    fetch_param(:order)
>> 
>> Change this ^^ to this:
>> 
>>   helper.fetch_param(:order)

> Ok, the tests now runs fine, but unfortunately the site itself doesn't
> work anymore.
> When the view gets rendered I get the following error:
> 
> undefined local variable or method `helper' for #<#<Class:0xb66566a0>:
> 0xb665532c>

What's the full backtrace?


More information about the rspec-users mailing list