"Zach Dennis" <[EMAIL PROTECTED]> writes: > On Sat, Oct 18, 2008 at 11:34 AM, Nick Hoffman <[EMAIL PROTECTED]> wrote: >> On 2008-10-18, at 09:16, Pat Maddox wrote: >>> >>> Scott Taylor <[EMAIL PROTECTED]> writes: >>>> >>>> You'd be able to write a spec like the following: >>>> >>>> it "should link with the correct name" do >>>> helper.should_receive(:link_to).with("foo", {:controller => "foo", >>>> :action => "foo"}) >>>> helper.my_method("foo") >>>> end >>> >>> I don't like this, I don't think you're testing anything here. >>> >>> Pat >> >> Hi Pat. I'm interested to hear how you'd spec that helper method, because >> some of specs are similar to what Scott proposed, and I'm always looking to >> improve them. > > > I'm pretty sure Pat is simply suggesting: > > it "should link with the correct name" do > helper.my_method("foo").should have_tag("a[href=?]", the_path, "foo") > end
Yup Pat _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users