Skip to content

Commit

Permalink
Fix spec output.
Browse files Browse the repository at this point in the history
* Restore console.error earlier.
  • Loading branch information
paulyoung committed Jun 2, 2014
1 parent 435b546 commit 9d859d8
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions spec/error-reporter.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand All @@ -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'
Expand All @@ -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', ->

Expand All @@ -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

0 comments on commit 9d859d8

Please sign in to comment.