Re: [rspec-users] Ability to stub a method differently the second time its called

2011-01-31 Thread Rob Aldred
On 26 Jan 2011, at 15:29, David Chelimsky wrote: > On Jan 26, 2011, at 7:34 AM, Rob Aldred wrote: > >> I'm having a bit of trouble stubbing out a method on a model which has some >> quite specific behaviour. >> Basically I want to check the method returns something different after ive >> calle

Re: [rspec-users] Ability to stub a method differently the second time its called

2011-01-26 Thread David Chelimsky
On Jan 26, 2011, at 7:34 AM, Rob Aldred wrote: > I'm having a bit of trouble stubbing out a method on a model which has some > quite specific behaviour. > Basically I want to check the method returns something different after ive > called update_attributes > > eg. > > @exam.draft? (returns tr

Re: [rspec-users] Ability to stub a method differently the second time its called

2011-01-26 Thread Tom Stuart
On 26 Jan 2011, at 13:34, Rob Aldred wrote: > I'm having a bit of trouble stubbing out a method on a model which has some > quite specific behaviour. > Basically I want to check the method returns something different after ive > called update_attributes > > eg. > > @exam.draft? (returns true)

[rspec-users] Ability to stub a method differently the second time its called

2011-01-26 Thread Rob Aldred
I'm having a bit of trouble stubbing out a method on a model which has some quite specific behaviour. Basically I want to check the method returns something different after ive called update_attributes eg. @exam.draft? (returns true) @exam.update_attributes(params[:exam]) # sets draft to fals