BackToRecord allow you to optionally reset the existing expectations on an
mock

On Sun, Nov 30, 2008 at 10:48 PM, ssteinegger <[EMAIL PROTECTED]> wrote:

>
> Ayende: I'm not sure that this is what Linus is looking for. As I
> understood (I may be wrong) BackToRecord allows you to define
> _additional_ behaviour to a mock / stub which is already in replay
> mode. Linus wants to _change_ the expectations or results he already
> defined.
>
> Linus: I already had the same problem. I solved it by setting up the
> expectations in a helper method that could be called or not. This
> makes you more flexible when you have more different tests. You could
> also use arguments on this helper method. Just don't make it to
> complicated to keep your tests clear.
>
> Ayende Rahien wrote:
> > BackToRecord
> >
> > On Fri, Nov 28, 2008 at 3:31 PM, Linus Roslund <[EMAIL PROTECTED]
> >wrote:
> >
> > > Is it possible to change a stub's behaviour after it has been set once?
> > >
> > > I'd like to set up a stub in the SetUp with a default behaviour and
> inject
> > > it to my SUT and then in some tests I want to change the behaviour -
> without
> > > injecting a new stub.
> > >
> > > Is it possible? If not, it would certainly be desirable.
> > >
> > > /Linus
> > >
> > >
> > > >
> > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to