Register or
log in
to add new notes.
mutru -
June 1, 2009
emime -
June 12, 2009
0 thanks
0 thanks
A stub with argument and return value
it "should use a dummy method with argument and return value" do dummy = mock("dummy").stub!(:emulate) dummy.should_receive(:emulate).with(:something).and_return("Done! sir!") dummy.emulate(:something).should == "Done! sir!" end

