All pastes #968433 Raw Edit

Unnamed

public text v1 · immutable
·published 2008-04-03 01:03 UTC
rendered paste body
describe 'stub!' do
  it "should honor with()" do
    @obj1 = Object.new
    @obj1.stub!(:baz).and_return(false)
    @obj1.stub!(:baz).with(1).and_return(true)

    @obj1.baz.should be_false
    @obj1.baz(1).should be_true
  end 
end