From c77ff30263f4346cb6816965202e901c18f19e6b Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Tue, 3 Mar 2015 13:27:31 -0800 Subject: [PATCH] Show the name of the constructor function when printing an `any` - instead of a `toString` of the entire constructor Fixes #796 --- spec/core/asymmetric_equality/AnySpec.js | 5 ++--- src/core/asymmetric_equality/Any.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/core/asymmetric_equality/AnySpec.js b/spec/core/asymmetric_equality/AnySpec.js index fc485d41..a1caaea5 100644 --- a/spec/core/asymmetric_equality/AnySpec.js +++ b/spec/core/asymmetric_equality/AnySpec.js @@ -22,7 +22,7 @@ describe("Any", function() { expect(any.asymmetricMatch({})).toBe(true); }); - + it("matches a Boolean", function() { var any = new j$.Any(Boolean); @@ -39,8 +39,7 @@ describe("Any", function() { it("jasmineToString's itself", function() { var any = new j$.Any(Number); - expect(any.jasmineToString()).toMatch(''); }); }); diff --git a/src/core/asymmetric_equality/Any.js b/src/core/asymmetric_equality/Any.js index 388ba22e..044a8507 100644 --- a/src/core/asymmetric_equality/Any.js +++ b/src/core/asymmetric_equality/Any.js @@ -29,7 +29,7 @@ getJasmineRequireObj().Any = function() { }; Any.prototype.jasmineToString = function() { - return ''; + return ''; }; return Any;