On Mar 21, 2011, at 12:52 PM, Kai Schlamp wrote: >>> Failure/Error: order_link(:name) >>> NoMethodError: >>> undefined method `fetch_param' for #<#<Class:0xb63d37ac>: >>> 0xb63be118> >> >> That's not the same error message you posted earlier: >> >> NoMethodError: >> undefined method `sort_direction' for >> #<RSpec::Core::ExampleGroup::Nested_1 > > The "#<#<Class:0xb63d37ac>" error shows up when using > helper.check_param in the order_link method as you suggested.
That's not what I meant to suggest. In the spec, the method being spec'd should be invoked through the helper: it "does something" do helper.method_being_specified end I did not mean to reference a helper object inside the implementation. Make sense? > The > "#<RSpec::Core::ExampleGroup::Nested_1" shows up with just using > check_param (without "helper."). > >> This ^^ message tells us that sort_direction is not implemented on the >> example. The new message (above) tells us that fetch_param is not >> implemented on the helper object, which means one of two things: >> >> 1) fetch_param is not implemented as an instance method in the >> ApplicationHelper module. This would be just a matter of implementing it. > > It should be. It works when viewing that template in the browser. > >> 2) ApplicationHelper is not included in the helper object. It should be >> included if the spec file is in spec/helpers. Is it? > > order_link is known and that is a method of ApplicationHelper, so I > guess it is included. > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users