Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close #458 by proving that there is no failure #528

Merged
merged 1 commit into from
Aug 1, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/node/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ require("../sinon/assert_test.js");
require("../sinon/test_test.js");
require("../sinon/test_case_test.js");
require("../sinon/match_test.js");
var buster = require("../runner");
require("../sinon/issues/issues.js");

var buster = require("../runner");
var args = process.argv.slice(2);

while (args.length) {
Expand Down
40 changes: 40 additions & 0 deletions test/sinon/issues/issues.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*jslint onevar: false, eqeqeq: false*/
/*globals sinon buster*/
/**
* @author Christian Johansen (christian@cjohansen.no)
* @license BSD
*
* Copyright (c) 2010-2014 Christian Johansen
*/
"use strict";

if (typeof require == "function" && typeof module == "object") {
var buster = require("../../runner");
var sinon = require("../../../lib/sinon");
}

buster.testCase("issues", {
setUp : function(){
this.sandbox = sinon.sandbox.create();
},

tearDown : function(){
this.sandbox.restore();
},

"458": {
"on node": {
requiresSupportFor: { "process": typeof process !== "undefined" },

"stub out fs.readFileSync": function () {
var testCase = this,
fs = require('fs'),
stub;

refute.exception(function(){
testCase.sandbox.stub(fs, "readFileSync");
});
}
}
}
});