On Jan 28, 2010, at 1:29 pm, Paul Hinze wrote: > I believe the lack of ability to use this notation comes down to a ruby > limitation, but I'm not sure. If that's the case, then we would need a > specific argument expectation (along the lines of my suggestion) that > executes in a context in which it can call the block.
I can't find a solution, I suspect Ruby 1.8 can't do this, but I'm guessing. Can I ask why you want to do this though? As another example, it would be unusual to spec something like: @array = [1, 2, 3] @array.should_receive(:map).with(block_that_doubles_values) You'd instead check that the array that came out was [2, 4, 6]. Ashley -- http://www.patchspace.co.uk/ http://www.linkedin.com/in/ashleymoran _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users