Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread s.ross
On Oct 19, 2007, at 12:21 PM, Jonathan Linowes wrote: > from my specs on restful_authentication's models/user_observer_spec.rb > > context "A UserObserver" do > setup do > @user = mock('user') > @user_observer = UserObserver.instance > end > > specify "should call UserNotifier.delive

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Ben Mabey
Yeah, you have two options really. The first is to do what linoj said and mock out the mailer that you are using. The other way, which Pat, was referring to was to actually check the mail queue. I generally do both. The reason being is that I want to make sure that I am using the correct ma

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 3:30 PM, Ben Mabey wrote: > yes, upon closer inspection, (as in http://www.vaporbase.com/postings/ Rspec_1.0_and_Restful_Authentication) in spec_helper.rb def set_mailer_in_test ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 1:54 PM, s.ross wrote: On Oct 18, 2007, at 6:09 AM, Daniel N wrote: On 9/11/07, s.ross <[EMAIL PROTECTED]> wrote: I have a story where the user resets the password [hey, this story thing really rocks!]. It is expected that the password will change and that the user will be

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Pat Maddox
On 10/19/07, s.ross <[EMAIL PROTECTED]> wrote: > > > > On Oct 18, 2007, at 6:09 AM, Daniel N wrote: > > > On 9/11/07, s.ross <[EMAIL PROTECTED]> wrote: > > I have a story where the user resets the password [hey, this story > > thing really rocks!]. It is expected that the password will change > > a

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread s.ross
On Oct 18, 2007, at 6:09 AM, Daniel N wrote: On 9/11/07, s.ross <[EMAIL PROTECTED]> wrote: I have a story where the user resets the password [hey, this story thing really rocks!]. It is expected that the password will change and that the user will be redirected to a login screen. A side effect i

Re: [rspec-users] Side Effects in Stories

2007-10-18 Thread Daniel N
On 9/11/07, s.ross <[EMAIL PROTECTED]> wrote: > > I have a story where the user resets the password [hey, this story > thing really rocks!]. It is expected that the password will change > and that the user will be redirected to a login screen. A side effect > is that the user will receive email wit

[rspec-users] Side Effects in Stories

2007-09-10 Thread s.ross
I have a story where the user resets the password [hey, this story thing really rocks!]. It is expected that the password will change and that the user will be redirected to a login screen. A side effect is that the user will receive email with his/her new password. Where I'm stuck is in asc