Skip to content

Commit

Permalink
Make message tests more lenient for recent Sinon versions
Browse files Browse the repository at this point in the history
Fixes #68.
  • Loading branch information
domenic committed Oct 16, 2015
1 parent 3a7740f commit e2934a7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions test/messages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,14 @@ describe "Messages", ->
spy(1, 2, 3)
spy("a", "b", "c")

expected = "expected spy to always have been called with arguments 1, 2, 3\n spy(1, 2, 3)\n" +
" spy(a, b, c)"
expected = /expected spy to always have been called with arguments 1, 2, 3/
expect(-> spy.should.always.have.been.calledWith(1, 2, 3)).to.throw(expected)

expectedExactly = "expected spy to always have been called with exact arguments 1, 2, 3\n" +
" spy(1, 2, 3)\n spy(a, b, c)"
expectedExactly = /expected spy to always have been called with exact arguments 1, 2, 3/
expect(-> spy.should.always.have.been.calledWithExactly(1, 2, 3)).to
.throw(expectedExactly)

expectedMatch = "expected spy to always have been called with arguments matching match(1)\n" +
" spy(1, 2, 3)\n spy(a, b, c)"
expectedMatch = /expected spy to always have been called with arguments matching match\(1\)/
expect(-> spy.should.always.have.been.calledWithMatch(sinon.match(1))).to
.throw(expectedMatch)

Expand Down

0 comments on commit e2934a7

Please sign in to comment.