public
Description: BDD that talks to domain experts first and code second
Home | Edit | New

Mocking and Stubbing with Cucumber

We recommend you exercise your whole stack when using Cucumber. You can set up mocks with expectations in your Step Definitions. You can read more about how in Bryan Helkamp’s blog post.
As of RSpec 1.2.8 if you need to use stubs within Cucumber and you are using the built in mocking framework that ships with RSpec you simply need to

require ‘spec/stubs/cucumber’
in your env.rb file.

We recommend you only mock and stub things like Time and external services like OpenID etc.

Last edited by aslakhellesoy, Mon Nov 02 04:16:56 -0800 2009
Home | Edit | New
Versions: