Hi there,
I'm trying to understand whether this fails by design or not:
var stub = sinon.stub().withArgs(42).returns("yes");
assert(stub(42) === "yes");
assert(stub(13) === undefined);
The second assertion fails as it still returns "yes". Breaking the stub creation into two steps fixes it:
var stub = sinon.stub();
stub.withArgs(42).returns("yes");
Is the DSL supposed to work in this way or is there a bug?
Thanks,
Mark