-
-
Notifications
You must be signed in to change notification settings - Fork 768
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
Wrong example in Sandbox documentation #1788
Comments
The So really it would be var foo = {
bar: function () {}
};
sinon.stub(foo, 'bar');
sinon.restore(); So the docs will need a little reworking to explain this. |
@kibertoad You are correct. Would you mind try to update the doc sources with a PR? @pgoldrbx It's correct that in recent Sinon versions it exports a default sandbox instance, but the Sandbox documentation should still explicitly mention how to create sandboxes and deal with them directly. The non-sandbox pieces can still refer to this section for details (once it is correct ...). |
@fatso83 Sure, will create a PR in the evening. |
This was fixed with #1792 |
Documentation seems to be wrong. Here is a code snippet from http://sinonjs.org/releases/v5.0.7/sandbox/:
This fails with "sandbox.stub is not a function" error.
Probably ".sandbox" in the first line should be replaced with "createSandbox();"?
The text was updated successfully, but these errors were encountered: