> This error ^^ suggests that sort_direction is being called on the example 
> itself rather than the helper object. Please post the spec so we can see 
> what's going on.

Sure ...

describe ApplicationHelper do
  describe "order link" do
    it "should create html link" do
      # things I tried
      view.stub(:check_param)
      helper.stub(:check_param)
      controller.stub(:check_param)
      self.stub(:check_param)

      order_link(:name)
    end
  end
end

Here is how check_param is called from within the helper:

module ApplicationHelper
  def order_link(column, title = nil)
    fetch_param(:order)
  end
end

and in application controller:

...
helper_method :fetch_param

def fetch_param(name)
  ...
end
...

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to