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