views:

16

answers:

0

I'm trying to write out some examples for a Proc that will be passed to a function as a block to be yield'd various values.

I'd like to be able to specify that

  • given some inputs, it will just return a value to the function
  • given other values, it will break (or return) a value, skipping the rest of the function's execution.

How can I specify this using mocks in Cucumber/RSpec?