Skip to content

Commit e2934a7

Browse files
committed
Make message tests more lenient for recent Sinon versions
Fixes #68.
1 parent 3a7740f commit e2934a7

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

‎test/messages.coffee‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,14 @@ describe "Messages", ->
187187
spy(1, 2, 3)
188188
spy("a", "b", "c")
189189

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

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

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

0 commit comments

Comments
 (0)