Build distribution; fix test in FF

This commit is contained in:
Colin O'Byrne and JR Boyens
2013-07-24 14:41:55 -07:00
parent 051f3499ec
commit 97ce396008
2 changed files with 23 additions and 6 deletions

View File

@@ -15,6 +15,8 @@ describe('Spies', function () {
});
it("warns the user that we indend to overwrite an existing property", function() {
TestClass.prototype.someFunction.and = "turkey";
expect(function() {
j$.createSpy(TestClass.prototype, TestClass.prototype.someFunction);
}).toThrowError("Jasmine spies would overwrite the 'and' and 'calls' properties on the object being spied upon");
@@ -23,8 +25,8 @@ describe('Spies', function () {
it("adds a spyStrategy and callTracker to the spy", function() {
var spy = j$.createSpy(TestClass.prototype, TestClass.prototype.someFunction);
expect(spy.and).toEqual(jasmine.any(j$.SpyStrategy);
expect(spy.calls).toEqual(jasmine.any(j$.CallTracker);
expect(spy.and).toEqual(jasmine.any(j$.SpyStrategy));
expect(spy.calls).toEqual(jasmine.any(j$.CallTracker));
});
});