Closed paneq closed 11 years ago
RSpec lets you do this:
library.should_receive(:checkout).with{|c| c.bytesize == 9 }.and_return(:checked_out)
Would be cool to have it supported in bogus:
describe Library do it "does something" do library = Library.new stub(library).checkout(with{|c| c.bytesize == 9 }) { :checked_out } library.checkout("some book").should == :checked_out end end
Good idea, I like the with api, we'll implement something like this soon.
with
@wrozka Good to hear it :)
Ship it ! :+1:
Shipped :)
RSpec lets you do this:
Would be cool to have it supported in bogus: