Re: [rspec-users] How To Mock A Chain (specifically ActionMailerModel.method.deliver)

2010-11-29 Thread Jack Kinsella
Cheers, very insightful. I liked your point about ease of testing having an inherent value. On Nov 25, 12:22 pm, David Chelimsky wrote: > On Wed, Nov 17, 2010 at 12:49 PM, Jack Kinsella > wrote: > > Hi, > > > In Rails 3 you deliver a mail message with the > > ActionMailerModel.method.deliver sy

Re: [rspec-users] How To Mock A Chain (specifically ActionMailerModel.method.deliver)

2010-11-25 Thread David Chelimsky
On Wed, Nov 17, 2010 at 12:49 PM, Jack Kinsella wrote: > Hi, > > In Rails 3 you deliver a mail message with the > ActionMailerModel.method.deliver syntax (e.g. > Notifier.welcome_message.deliver). How do you test that this method is > called in Rspec. I'm looking for an equivalent to "stub_chain"

[rspec-users] How To Mock A Chain (specifically ActionMailerModel.method.deliver)

2010-11-25 Thread Jack Kinsella
Hi, In Rails 3 you deliver a mail message with the ActionMailerModel.method.deliver syntax (e.g. Notifier.welcome_message.deliver). How do you test that this method is called in Rspec. I'm looking for an equivalent to "stub_chain" which has expectations. I'm testing that messages are sent on certa