[rspec-users] cucumber - when to stub/mock
Matthew Van Horn
mattvanhorn at gmail.com
Mon May 4 06:49:23 EDT 2009
I followed Bryan's pattern here, and let RSpec reset everything.
http://www.brynary.com/2009/2/3/cucumber-step-definition-tip-stubbing-time
On May 4, 2009, at 3:13 AM, aslak hellesoy wrote:
>
> One thing to be aware of when stubbing: There is no cleanup/revert
> logic yet in Cucumber. This means that if you stub a class method,
> it will remain stubbed for subsequent scenarios. This means high
> risk of coupled scenarios and unpredictable behaviour if you run
> scenarios in different orders.
>
> If you need a cleanup facility (remove stubbed methods after a
> scenario), please file a feature request.
>
> Aslak
More information about the rspec-users
mailing list