Pull across sinon "mock" from docvim project
authorGreg Hurrell <greg@hurrell.net>
Fri, 31 Jul 2015 17:22:12 +0000 (10:22 -0700)
committerGreg Hurrell <greg@hurrell.net>
Fri, 31 Jul 2015 17:22:12 +0000 (10:22 -0700)
Should have down this previously, but overlooked it.

src/__mocks__/sinon.js [new file with mode: 0644]
src/__mocks__/stub.js [deleted file]

diff --git a/src/__mocks__/sinon.js b/src/__mocks__/sinon.js
new file mode 100644 (file)
index 0000000..21dfac6
--- /dev/null
@@ -0,0 +1,24 @@
+/**
+ * Copyright 2015-present Greg Hurrell. All rights reserved.
+ * Licensed under the terms of the MIT license.
+ */
+
+'use strict';
+
+import sinon from 'sinon';
+
+let sandbox;
+
+beforeEach(function() {
+  sandbox = sinon.sandbox.create();
+});
+
+afterEach(function() {
+  sandbox.restore();
+});
+
+global.sinon = {
+  stub() {
+    sandbox.stub(...arguments);
+  },
+};
diff --git a/src/__mocks__/stub.js b/src/__mocks__/stub.js
deleted file mode 100644 (file)
index ee41022..0000000
+++ /dev/null
@@ -1 +0,0 @@
-// TODO: replace with actual mock files