From 9d859d8ea0506d615a102c857e9f4a10e5002059 Mon Sep 17 00:00:00 2001 From: Paul Young Date: Sun, 1 Jun 2014 20:20:25 -0400 Subject: [PATCH] Fix spec output. * Restore console.error earlier. --- spec/error-reporter.coffee | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spec/error-reporter.coffee b/spec/error-reporter.coffee index b90562d..bc31c0e 100644 --- a/spec/error-reporter.coffee +++ b/spec/error-reporter.coffee @@ -147,10 +147,10 @@ describe 'Error reporter', -> ].join '\n' contextualError = stub.firstCall.args[0] - expect(contextualError).to.equal contextualErrorFixture - stub.restore() + expect(contextualError).to.equal contextualErrorFixture + context 'that does not have the previous line', -> it 'should provide the current and next line as context', -> sourceCode = 'ab'.split('').join '\n' @@ -172,10 +172,10 @@ describe 'Error reporter', -> ].join '\n' contextualError = stub.firstCall.args[0] - expect(contextualError).to.equal contextualErrorFixture - stub.restore() + expect(contextualError).to.equal contextualErrorFixture + context 'that does not have the next line', -> it 'should provide the previous and current line as context', -> sourceCode = 'ab'.split('').join '\n' @@ -197,10 +197,10 @@ describe 'Error reporter', -> ].join '\n' contextualError = stub.firstCall.args[0] - expect(contextualError).to.equal contextualErrorFixture - stub.restore() + expect(contextualError).to.equal contextualErrorFixture + context 'that has the previous and next line', -> it 'should provide the previous, current, and next line as context', -> sourceCode = 'abc'.split('').join '\n' @@ -223,10 +223,10 @@ describe 'Error reporter', -> ].join '\n' contextualError = stub.firstCall.args[0] - expect(contextualError).to.equal contextualErrorFixture - stub.restore() + expect(contextualError).to.equal contextualErrorFixture + describe 'when formatting', -> @@ -252,6 +252,6 @@ describe 'Error reporter', -> ].join '\n' contextualError = stub.firstCall.args[0] - expect(contextualError).to.equal contextualErrorFixture - stub.restore() + + expect(contextualError).to.equal contextualErrorFixture