getting the object passed as an argument to a stubbed method with Mocha getting the object passed as an argument to a stubbed method with Mocha ruby ruby

getting the object passed as an argument to a stubbed method with Mocha


I figured it out! Turns out with can take a block.

Foo.expects(:bar).with do |the_hash|  the_hash[:abc] == 123end