From 6631b19f9347154598763ac6726e6365644f4d40 Mon Sep 17 00:00:00 2001 From: Spencer Alger Date: Tue, 24 Dec 2013 00:25:37 -0700 Subject: [PATCH] JSON.serialize was still stubbed when testling tries to phone-home about the test result --- test/unit/test_json_serializer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/test_json_serializer.js b/test/unit/test_json_serializer.js index e0107978b..41d76bc95 100644 --- a/test/unit/test_json_serializer.js +++ b/test/unit/test_json_serializer.js @@ -1,6 +1,7 @@ describe('JSON serializer', function () { var JsonSerializer = require('../../src/lib/serializers/json'); var expect = require('expect.js'); + var sinon = require('sinon'); var stub = require('./auto_release_stub').make(); function makeSerializer() { @@ -9,10 +10,11 @@ describe('JSON serializer', function () { describe('#serialize', function () { it('defers to JSON.stringify', function () { - stub(JSON, 'stringify'); + var stub = sinon.stub(JSON, 'stringify'); var ser = makeSerializer(); ser.serialize({ some: 'object' }); - expect(JSON.stringify.callCount).to.eql(1); + expect(stub.callCount).to.eql(1); + stub.restore(); }); it('does not modify strings', function () {