This spec is for a case where FF *sometimes* loses it's exception

message property. Fixed the spec using a double so that the test will
run green on non-FF environments.
This commit is contained in:
Dan Hansen and Davis W. Frank
2013-03-01 14:32:58 -08:00
parent cf7bb0269b
commit 6eecc562ff
+5 -4
View File
@@ -6,11 +6,12 @@ describe("Spec", function() {
expect(jasmine.Spec.isPendingSpecException(e)).toBe(true); expect(jasmine.Spec.isPendingSpecException(e)).toBe(true);
}); });
it("#isPendingSpecException returns true for a pending spec exception (protect against FF bug)", function() { it("#isPendingSpecException returns true for a pending spec exception (even when FF bug is present)", function() {
var e = new Error(jasmine.Spec.pendingSpecExceptionMessage); var fakeError = {
delete e.message; toString: function() { return "Error: " + jasmine.Spec.pendingSpecExceptionMessage; }
};
expect(jasmine.Spec.isPendingSpecException(e)).toBe(true); expect(jasmine.Spec.isPendingSpecException(fakeError)).toBe(true);
}); });
it("#isPendingSpecException returns true for a pending spec exception", function() { it("#isPendingSpecException returns true for a pending spec exception", function() {