From 46249bf51545cc97003393f18162090ce39128b5 Mon Sep 17 00:00:00 2001 From: Pivotal Date: Sat, 5 Jun 2010 10:07:58 -0400 Subject: [PATCH] Fix spec failure that occured when stack traces/line numbers are available --- spec/suites/SpecRunningSpec.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/spec/suites/SpecRunningSpec.js b/spec/suites/SpecRunningSpec.js index 67f5229..de41a92 100644 --- a/spec/suites/SpecRunningSpec.js +++ b/spec/suites/SpecRunningSpec.js @@ -1168,7 +1168,8 @@ describe("jasmine spec running", function () { }); }); }); - } catch(e) {} + } catch(e) { + } env.describe("outer2", function() { env.it("should xxx", function() { @@ -1179,16 +1180,16 @@ describe("jasmine spec running", function () { env.addReporter(superSimpleReporter); env.execute(); - expect(specs).toEqual([ - 'Spec: outer1 inner1 should thingy.', - 'Result: Passed.', - 'Spec: outer1 encountered a declaration exception.', - 'Result: Error: fake error', - 'Spec: outer1 inner2 should other thingy.', - 'Result: Passed.', - 'Spec: outer2 should xxx.', + expect(specs.join('')).toMatch(new RegExp( + 'Spec: outer1 inner1 should thingy.' + + 'Result: Passed.' + + 'Spec: outer1 encountered a declaration exception.' + + 'Result: Error: fake error.*' + + 'Spec: outer1 inner2 should other thingy.' + + 'Result: Passed.' + + 'Spec: outer2 should xxx.' + 'Result: Passed.' - ]); + )); }); });