All, In a Rails helper spec, how do I stub or mock the 'link_to' method? When i step into link_to, self.class is Spec::Rails::Example::HelperExampleGroup::Subclass_1::Subclass_5::Subclass_1.
What I'm trying to do is stub link_to and check that its parameters are correct--i.e., that a helper method is properly constructing the parameters to link_to. The work-around (and what seems to me to be a more awkward approach) is to grep the output of the helper method for a link with a proper href property. Thoughts? Ed _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users