Chris M. wrote in post #1014770:
>CurriculumCommentMailer.should_receive(:comment_update).and_return(double("mailer").stub(:deliver))
>
> That's odd -- I would expect that second version to work if the first
> version is working. What error did you get? Was it the same "undefined
> method `deliver' for nil:NilClass" as before?

It was giving this error:
NoMethodError: undefined method `deliver' for
#<RSpec::Mocks::MessageExpectation:0x10542bb88>

But, I changed the test to this and it works fine:
CurriculumCommentMailer.should_receive(:comment_update).and_return(double("mailer",
:deliver => true))

-Jason

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to