[rspec-users] Specing a method that returns a lambda

Iain Barnett iainspeed at gmail.com
Mon Aug 20 16:21:54 UTC 2012


Thanks for replying, and my apologies for the delay in my reply.

On 11 Aug 2012, at 12:07, David Chelimsky wrote:

> 
> My guess is that it's related to the context being included and the
> fact that you're using before :all. Try it with before :each and see
> if that works. If not, please run the spec with the --backtrace flag
> and post the full backtrace, along with the code in the included
> context.

I changed it to `before :each` as you suggested, which is a good move, and then I took the pragmatic route of using `be_a_kind_of Proc` along with arity, instead of `respond_to`, and that works. If the problem arises again later I'll delve deeper and post the backtrace.

Regards,
Iain


More information about the rspec-users mailing list