[rspec-users] Test HTML output from Rails helper

Nick Hoffman nick at deadorange.com
Sat Oct 18 11:34:59 EDT 2008

On 2008-10-18, at 09:16, Pat Maddox wrote:
> Scott Taylor <mailing_lists at railsnewbie.com> 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.


More information about the rspec-users mailing list