Fix spec failure that occured when stack traces/line numbers are available

This commit is contained in:
Pivotal 2010-06-05 10:07:58 -04:00
parent 03d7bfb7d4
commit 46249bf515

View File

@ -1168,7 +1168,8 @@ describe("jasmine spec running", function () {
}); });
}); });
}); });
} catch(e) {} } catch(e) {
}
env.describe("outer2", function() { env.describe("outer2", function() {
env.it("should xxx", function() { env.it("should xxx", function() {
@ -1179,16 +1180,16 @@ describe("jasmine spec running", function () {
env.addReporter(superSimpleReporter); env.addReporter(superSimpleReporter);
env.execute(); env.execute();
expect(specs).toEqual([ expect(specs.join('')).toMatch(new RegExp(
'Spec: outer1 inner1 should thingy.', 'Spec: outer1 inner1 should thingy.' +
'Result: Passed.', 'Result: Passed.' +
'Spec: outer1 encountered a declaration exception.', 'Spec: outer1 encountered a declaration exception.' +
'Result: Error: fake error', 'Result: Error: fake error.*' +
'Spec: outer1 inner2 should other thingy.', 'Spec: outer1 inner2 should other thingy.' +
'Result: Passed.', 'Result: Passed.' +
'Spec: outer2 should xxx.', 'Spec: outer2 should xxx.' +
'Result: Passed.' 'Result: Passed.'
]); ));
}); });
}); });