Added wasNotCalledWith matcher, used argsForCall a bit less

This commit is contained in:
Nathan Wilmes & Davis W. Frank
2009-12-21 11:45:49 -08:00
parent 849a4efda8
commit d90852336f
3 changed files with 40 additions and 8 deletions

View File

@@ -33,8 +33,8 @@ describe('Spies', function () {
TestClass.someFunction('foo');
TestClass.someFunction('bar');
expect(TestClass.someFunction.argsForCall[0]).toEqual(['foo']);
expect(TestClass.someFunction.argsForCall[1]).toEqual(['bar']);
expect(TestClass.someFunction.calls[0].args).toEqual(['foo']);
expect(TestClass.someFunction.calls[1].args).toEqual(['bar']);
expect(TestClass.someFunction.mostRecentCall.args).toEqual(['bar']);
});
@@ -184,4 +184,4 @@ describe('Spies', function () {
expect(spyObj.method2.identity).toEqual('BaseName.method2');
});
});
});