From 7ad75c13d4fa87ab3ab4e53417c096da8845e326 Mon Sep 17 00:00:00 2001 From: ragaskar Date: Wed, 4 Apr 2012 08:41:59 -0700 Subject: [PATCH] Fix Matchers.any specs in Firefox - Firefox adds whitespace to the resulting to_string function, necessary to remove it for the match to occur correctly. --- spec/core/MatchersSpec.js | 10 +++++----- src/version.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/core/MatchersSpec.js b/spec/core/MatchersSpec.js index a8e965ac..7be2b814 100644 --- a/spec/core/MatchersSpec.js +++ b/spec/core/MatchersSpec.js @@ -947,28 +947,28 @@ describe("jasmine.Matchers", function() { describe("with Object", function () { it("says it's looking for an object", function () { any = jasmine.any(Object); - expect(any.jasmineToString()).toMatch(//); + expect(any.jasmineToString().replace(/\n/g, "")).toMatch(//); }); }); describe("with Function", function () { it("says it's looking for a function", function () { any = jasmine.any(Function); - expect(any.jasmineToString()).toMatch(//); + expect(any.jasmineToString().replace(/\n/g, "")).toMatch(//); }); }); describe("with String", function () { it("says it's looking for a string", function () { any = jasmine.any(String); - expect(any.jasmineToString()).toMatch(//); + expect(any.jasmineToString().replace(/\n/g, "")).toMatch(//); }); }); describe("with Number", function () { it("says it's looking for a number", function () { any = jasmine.any(Number); - expect(any.jasmineToString()).toMatch(//); + expect(any.jasmineToString().replace(/\n/g, "")).toMatch(//); }); }); @@ -976,7 +976,7 @@ describe("jasmine.Matchers", function() { it("says it's looking for an object", function () { function MyClass () {} any = jasmine.any(MyClass); - expect(any.jasmineToString()).toMatch(//); + expect(any.jasmineToString().replace("\n", "")).toMatch(//); }); }); }); diff --git a/src/version.js b/src/version.js index dac4552f..84f097b8 100644 --- a/src/version.js +++ b/src/version.js @@ -3,6 +3,6 @@ jasmine.version_= { "major": 1, "minor": 2, "build": 0, - "revision": 1333492179, + "revision": 1333553033, "release_candidate": 2 };