konacha-chai-matchers 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitmodules CHANGED
@@ -43,3 +43,6 @@
43
43
  [submodule "sinon"]
44
44
  path = sinon
45
45
  url = git://github.com/cjohansen/Sinon.JS.git
46
+ [submodule "memo-is"]
47
+ path = memo-is
48
+ url = https://github.com/d11wtq/node-memo-is.git
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Konacha Chai Matchers
2
2
  =====================
3
3
 
4
+ [![Gem Version](https://fury-badge.herokuapp.com/rb/konacha-chai-matchers.png)](http://badge.fury.io/rb/konacha-chai-matchers)
5
+
4
6
  This library contains all [Chai.js plugins](http://chaijs.com/plugins)
5
7
 
6
8
  Not all plugins are tested!
data/VERSIONS CHANGED
@@ -1,6 +1,6 @@
1
1
  chai-spies: 0.5.1
2
- sinon-chai: 2.3.1
3
- chai-as-promised: 3.2.5
2
+ sinon-chai: 2.4.0
3
+ chai-as-promised: 3.3.1
4
4
  chai-jquery: 1.1.1
5
5
  chai-timers: 0.2.0
6
6
  chai-stats: 0.2.0
@@ -9,7 +9,8 @@ chai-factories: 0.1.0
9
9
  chai-changes: 1.3.1
10
10
  chai-backbone: 0.9.2
11
11
  js-factories: 0.9.0
12
- mocha-as-promised: 1.2.1
13
- chai-things: 0.1.2
14
- chai-fuzzy: 1.1.1
15
- sinon: 1.6.0
12
+ mocha-as-promised: 1.4.0
13
+ chai-things: 0.2.0
14
+ chai-fuzzy: 1.3.0
15
+ sinon: 1.7.3
16
+ memo-is: 0.0.2
@@ -1,7 +1,7 @@
1
1
  module Konacha
2
2
  module Chai
3
3
  module Matchers
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,4 @@
1
- (function (chaiAsPromised) {
1
+ (function (chaiAsPromised) {
2
2
  "use strict";
3
3
 
4
4
  // Module systems magic dance.
@@ -149,7 +149,7 @@
149
149
  } else {
150
150
  messageVerb = "including";
151
151
  messageIsGood = function () {
152
- return rejectionReason.message.indexOf(message) !== -1;
152
+ return rejectionReason && rejectionReason.message.indexOf(message) !== -1;
153
153
  };
154
154
  }
155
155
 
@@ -179,7 +179,7 @@
179
179
  if (message) {
180
180
  assertion.assert(messageIsGood(),
181
181
  "expected promise to be rejected with an error " + messageVerb + " " + message +
182
- " but got " + utils.inspect(rejectionReason.message));
182
+ " but got " + utils.inspect(rejectionReason && rejectionReason.message));
183
183
  }
184
184
  }
185
185
  }
@@ -267,11 +267,13 @@
267
267
  return Assertion.prototype.assert.apply(assertionPromise, arguments);
268
268
  };
269
269
 
270
+ Object.defineProperty(assertionPromise, "_obj", Object.getOwnPropertyDescriptor(Assertion.prototype, "_obj"));
271
+
270
272
  // 3. Chai asserters, which act upon the promise's fulfillment value.
271
273
  var asserterNames = Object.getOwnPropertyNames(Assertion.prototype);
272
274
  asserterNames.forEach(function (asserterName) {
273
275
  // We already added `notify` and `assert`; don't mess with those.
274
- if (asserterName === "notify" || asserterName === "assert") {
276
+ if (asserterName === "notify" || asserterName === "assert" || asserterName === "_obj") {
275
277
  return;
276
278
  }
277
279
 
@@ -86,4 +86,25 @@
86
86
  , expected
87
87
  )
88
88
  });
89
+
90
+ //export tdd style
91
+ var assert = chai.assert;
92
+ assert.like = function (val, exp, msg) {
93
+ new chai.Assertion(val, msg).to.be.like(exp);
94
+ };
95
+ assert.notLike = function (val, exp, msg) {
96
+ new chai.Assertion(val, msg).to.not.be.like(exp);
97
+ };
98
+ assert.containOneLike = function (val, exp, msg) {
99
+ new chai.Assertion(val, msg).to.containOneLike(exp);
100
+ };
101
+ assert.notContainOneLike = function (val, exp, msg) {
102
+ new chai.Assertion(val, msg).to.not.containOneLike(exp);
103
+ };
104
+ assert.jsonOf = function (val, exp, msg) {
105
+ new chai.Assertion(val, msg).to.be.jsonOf(exp);
106
+ };
107
+ assert.notJsonOf = function (val, exp, msg) {
108
+ new chai.Assertion(val, msg).to.not.be.jsonOf(exp);
109
+ };
89
110
  }));
@@ -26,9 +26,8 @@
26
26
  throw new Error("cannot use something without include or contains");
27
27
  // Flag that this is a `something` chain
28
28
  var lastSomething = this, newSomething = {};
29
- while (utils.flag(lastSomething, "something")) {
29
+ while (utils.flag(lastSomething, "something"))
30
30
  lastSomething = utils.flag(lastSomething, "something");
31
- }
32
31
  // Transfer all the flags to the new `something` and remove them from `this`
33
32
  utils.transferFlags(this, newSomething, false);
34
33
  for (var prop in this.__flags)
@@ -61,6 +60,24 @@
61
60
  );
62
61
  }
63
62
 
63
+ // Handles the `all` chain property
64
+ function chainAll() {
65
+ // Flag that this is an `all` chain
66
+ var lastAll = this, newAll = {};
67
+ while (utils.flag(lastAll, "all"))
68
+ lastAll = utils.flag(lastAll, "all");
69
+ // Transfer all the flags to the new `all` and remove them from `this`
70
+ utils.transferFlags(this, newAll, false);
71
+ for (var prop in this.__flags)
72
+ if (!/^(?:all|object|ssfi|message)$/.test(prop))
73
+ delete this.__flags[prop];
74
+
75
+ // Add the `newAll` to the `lastAll` in the chain.
76
+ utils.flag(lastAll, "all", newAll);
77
+ // Clear the `all` flag from `newAll`.
78
+ utils.flag(newAll, "all", false);
79
+ }
80
+
64
81
  // Find all assertion methods
65
82
  var methodNames = Object.getOwnPropertyNames(assertionPrototype)
66
83
  .filter(function (propertyName) {
@@ -68,8 +85,10 @@
68
85
  return typeof property.value === "function";
69
86
  });
70
87
 
71
- // Override all methods to react on a possible `something` in the chain
88
+ // Override all assertion methods
72
89
  methodNames.forEach(function (methodName) {
90
+
91
+ // Override the method to react on a possible `something` in the chain
73
92
  Assertion.overwriteMethod(methodName, function (_super) {
74
93
  return function somethingMethod() {
75
94
  // Return if no `something` has been used in the chain
@@ -108,11 +127,13 @@
108
127
  // means the base assertion ("no element must satisfy x") fails
109
128
  if (negate) {
110
129
  if (!utils.flag(somethingFlags, "something")) {
111
- // If we have no child `something`s then assert the negated item assertion, which should fail and throw an error
130
+ // If we have no child `something`s then assert the negated item assertion,
131
+ // which should fail and throw an error
112
132
  var negItemAssertion = copyAssertion(this, item, somethingAssert, true);
113
133
  somethingMethod.apply(negItemAssertion, arguments);
114
134
  }
115
- // Throw here if we have a child `something`, or, for some reason, the negated item assertion didn't throw
135
+ // Throw here if we have a child `something`,
136
+ // or if the negated item assertion didn't throw for some reason
116
137
  new Assertion(arrayObject).assert(false,
117
138
  "expected no element of #{this} to satisfy the assertion");
118
139
  }
@@ -134,6 +155,72 @@
134
155
  throw assertionError;
135
156
  };
136
157
  });
158
+
159
+ // Override the method to react on a possible `all` in the chain
160
+ Assertion.overwriteMethod(methodName, function (_super) {
161
+ return function allMethod() {
162
+ // Return if no `all` has been used in the chain
163
+ var allFlags = utils.flag(this, "all");
164
+ if (!allFlags)
165
+ return _super.apply(this, arguments);
166
+ // Use the nested `all` flag as the new `all` flag for this.
167
+ utils.flag(this, "all", utils.flag(allFlags, "all"));
168
+
169
+ // The assertion's object for `all` should be array-like
170
+ var arrayObject = utils.flag(this, "object");
171
+ expect(arrayObject).to.have.property("length");
172
+ var length = arrayObject.length;
173
+ expect(length).to.be.a("number", "all object length");
174
+
175
+ // In the positive case, an empty array means success
176
+ var negate = utils.flag(allFlags, "negate");
177
+ if (!negate && !length)
178
+ return;
179
+
180
+ // Try the assertion on every array element
181
+ var assertionError, item, itemAssertion;
182
+ for (var i = 0; i < length; i++) {
183
+ // Test whether the element satisfies the assertion
184
+ item = arrayObject[i];
185
+ itemAssertion = copyAssertion(this, item, allAssert);
186
+ assertionError = null;
187
+ try { allMethod.apply(itemAssertion, arguments); }
188
+ catch (error) { assertionError = error; }
189
+ // If the element does not satisfy the assertion
190
+ if (assertionError) {
191
+ // In the positive case, this means the assertion has failed
192
+ if (!negate) {
193
+ // If we have no child `all`s then throw the item's assertion error
194
+ if (!utils.flag(allFlags, "all"))
195
+ throw assertionError;
196
+ // Throw here if we have a child `all`,
197
+ new Assertion(arrayObject).assert(false,
198
+ "expected all elements of #{this} to satisfy the assertion");
199
+ }
200
+ // In the negative case, a failing element means the assertion holds
201
+ return;
202
+ }
203
+ }
204
+ // Changes the assertion message to an array viewpoint
205
+ function allAssert(test, positive, negative, expected, actual) {
206
+ var replacement = (negate ? "not " : "") + "all elements of #{this}";
207
+ utils.flag(this, "object", arrayObject);
208
+ assertionPrototype.assert.call(this, test,
209
+ (negate ? negative : positive).replace("#{this}", replacement),
210
+ (negate ? positive : negative).replace("#{this}", replacement),
211
+ expected, actual);
212
+ }
213
+ // If we reach this point, no failing element has been found
214
+ if (negate) {
215
+ // Assert the negated item assertion which should fail and throw an error
216
+ var negItemAssertion = copyAssertion(this, item, allAssert, true);
217
+ allMethod.apply(negItemAssertion, arguments);
218
+ // Throw here if the negated item assertion didn't throw for some reason
219
+ new Assertion(arrayObject).assert(false,
220
+ "expected not all elements of #{this} to satisfy the assertion");
221
+ }
222
+ };
223
+ });
137
224
  });
138
225
 
139
226
  // Copies an assertion to another item, using the specified assert function
@@ -151,4 +238,6 @@
151
238
  if (!(methodName in assertionPrototype))
152
239
  Assertion.addChainableMethod(methodName, assertSomething, chainSomething);
153
240
  });
241
+ // Define the `all` chainable assertion method
242
+ Assertion.addChainableMethod("all", null, chainAll);
154
243
  }));
@@ -0,0 +1,127 @@
1
+ /*
2
+ * node-memo-is.
3
+ * Copyright © 2012 Chris Corbyn.
4
+ *
5
+ * See LICENSE file for details.
6
+ */
7
+
8
+ /**
9
+ * Memoization context housing a stack of memoizer callbacks.
10
+ *
11
+ * An initial memoizer function is created by calling #is() on the Memoizer
12
+ * then the function can be overridden by calling #is() on that memoizer
13
+ * etc, as many times as required.
14
+ *
15
+ * The memoizer function is only available inside of before()/after() and it()
16
+ * contexts.
17
+ *
18
+ * The same value is guaranteed to be returned from the memoizer function every
19
+ * time it is invoked within a single example. After each example the state is
20
+ * reset.
21
+ *
22
+ * If the memoizer function is overridden in an example group, the overridden
23
+ * function is seen by all sub-contexts. It is then reset to the previous
24
+ * state before further example groups are executed.
25
+ *
26
+ * @example
27
+ *
28
+ * var memo = require('memo-is');
29
+ *
30
+ * describe('Memoizer', function(){
31
+ * var example = memo().is(function() { return []; });
32
+ *
33
+ * it('returns the same value every time', function(){
34
+ * assert(example() === example());
35
+ * });
36
+ *
37
+ * describe('when overridden', function(){
38
+ * example.is(function() { return ['bob']; });
39
+ *
40
+ * it('returns the overridden value', function(){
41
+ * assert.equal(example()[0], 'bob');
42
+ * });
43
+ *
44
+ * describe('and used in a sub context', function(){
45
+ * it('returns the overridden value', function(){
46
+ * assert.equal(example()[0], 'bob');
47
+ * });
48
+ * });
49
+ * });
50
+ *
51
+ * describe('state between tests', function(){
52
+ * it('is reset to the value for the current context', function(){
53
+ * assert.equal(example().length, 0);
54
+ * });
55
+ *
56
+ * describe('when the value is modified', function(){
57
+ * it('is changed in the example that modifies it', function(){
58
+ * example().push(42);
59
+ * assert.equal(example()[0], 42);
60
+ * });
61
+ *
62
+ * it('is reset between examples', function(){
63
+ * assert.equal(example().length, 0);
64
+ * });
65
+ * });
66
+ * });
67
+ * });
68
+ */
69
+ var Memoizer = function() {
70
+ var value
71
+ , stack = []
72
+ , invoked = false
73
+ ;
74
+
75
+ var memoizer = function() {
76
+ if (stack.length == 0) {
77
+ throw new Error('Memoizer function called outside of test example context');
78
+ }
79
+
80
+ if (!invoked) {
81
+ value = stack[stack.length - 1]();
82
+ invoked = true;
83
+ }
84
+ return value;
85
+ };
86
+
87
+ var reset = function() {
88
+ invoked = false;
89
+ value = undefined;
90
+ };
91
+
92
+ var push = function(callback) {
93
+ return function() { stack.push(callback); };
94
+ };
95
+
96
+ var pop = function() {
97
+ stack.pop();
98
+ };
99
+
100
+ /** Push a new function to the memoizer stack for the current example group */
101
+ this.is = function(callback) {
102
+ before(push(callback));
103
+ afterEach(reset);
104
+ after(pop);
105
+ return memoizer;
106
+ };
107
+
108
+ memoizer.is = this.is;
109
+ };
110
+
111
+ if (typeof(module) != 'undefined' && module.exports) { // Node.js
112
+ /**
113
+ * Return a new Memoizer object.
114
+ *
115
+ * @example
116
+ * var dog = memo().is(function(){ return new Dog(); });
117
+ *
118
+ * @return [Memoizer]
119
+ */
120
+ var memo = module.exports = function() {
121
+ return new Memoizer();
122
+ };
123
+ } else { // everything else
124
+ function memo() {
125
+ return new Memoizer();
126
+ }
127
+ }
@@ -1,6 +1,20 @@
1
1
  (function (mochaAsPromised) {
2
2
  "use strict";
3
3
 
4
+ function findNodeJSMocha(moduleToTest, suffix) {
5
+ if (moduleToTest.id.indexOf(suffix, moduleToTest.id.length - suffix.length) !== -1 && moduleToTest.exports) {
6
+ return moduleToTest.exports;
7
+ }
8
+
9
+ for (var i = 0; i < moduleToTest.children.length; ++i) {
10
+ var found = findNodeJSMocha(moduleToTest.children[i], suffix);
11
+
12
+ if (found) {
13
+ return found;
14
+ }
15
+ }
16
+ }
17
+
4
18
  // Module systems magic dance.
5
19
 
6
20
  if (typeof require === "function" && typeof exports === "object" && typeof module === "object") {
@@ -12,19 +26,17 @@
12
26
  if (!mocha) {
13
27
  if (typeof process === "object" && Object.prototype.toString.call(process) === "[object process]") {
14
28
  // We're in *real* Node.js, not in a browserify-like environment. Do automatic detection logic.
15
- var path = require("path");
16
-
17
- // `process.argv[1]` is either something like `"/host/package/node_modules/mocha/bin/_mocha`", or
18
- // `"/path/to/global/node_modules/mocha/bin/_mocha"`. Verify that, though:
19
- var lastThreeSegments = process.argv[1].split(path.sep).slice(-3);
20
- if (lastThreeSegments[0] !== "mocha" || lastThreeSegments[1] !== "bin") {
21
- throw new Error("Attempted to automatically plug in to Mocha, but was not running through " +
22
- "the Mocha test runner. Either run using the Mocha command-line test runner, " +
23
- "or plug in manually by passing the running Mocha module.");
29
+
30
+ // Funky syntax prevents Browserify from detecting the require, since it's needed for Node.js-only stuff.
31
+ var path = (require)("path");
32
+ var suffix = path.join("mocha", "lib", "mocha.js");
33
+ mocha = findNodeJSMocha(require.main, suffix);
34
+
35
+ if (mocha === undefined) {
36
+ throw new Error("Attempted to automatically plug in to Mocha, but could not detect a " +
37
+ "running Mocha module.");
24
38
  }
25
39
 
26
- var mochaPath = path.resolve(process.argv[1], "../..");
27
- mocha = (require)(mochaPath); // Trick browserify into not complaining.
28
40
  } else if (typeof Mocha !== "undefined") {
29
41
  // We're in a browserify-like emulation environment. Try the `Mocha` global.
30
42
  mocha = Mocha;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Sinon.JS 1.6.0, 2013/02/26
2
+ * Sinon.JS 1.5.2, 2013/02/08
3
3
  *
4
4
  * @author Christian Johansen (christian@cjohansen.no)
5
5
  * @author Contributors: https://github.com/cjohansen/Sinon.JS/blob/master/AUTHORS
6
6
  *
7
7
  * (The BSD License)
8
8
  *
9
- * Copyright (c) 2010-2013, Christian Johansen, christian@cjohansen.no
9
+ * Copyright (c) 2010-2012, Christian Johansen, christian@cjohansen.no
10
10
  * All rights reserved.
11
11
  *
12
12
  * Redistribution and use in source and binary forms, with or without modification,
@@ -41,7 +41,7 @@
41
41
  * @author Christian Johansen (christian@cjohansen.no)
42
42
  * @license BSD
43
43
  *
44
- * Copyright (c) 2010-2013 Christian Johansen
44
+ * Copyright (c) 2010-2011 Christian Johansen
45
45
  */
46
46
 
47
47
  var sinon = (function (buster) {
@@ -284,7 +284,7 @@ var sinon = (function (buster) {
284
284
 
285
285
  calledInOrder: function (spies) {
286
286
  for (var i = 1, l = spies.length; i < l; i++) {
287
- if (!spies[i - 1].calledBefore(spies[i]) || !spies[i].called) {
287
+ if (!spies[i - 1].calledBefore(spies[i])) {
288
288
  return false;
289
289
  }
290
290
  }
@@ -627,7 +627,7 @@ var sinon = (function (buster) {
627
627
  * @author Christian Johansen (christian@cjohansen.no)
628
628
  * @license BSD
629
629
  *
630
- * Copyright (c) 2010-2013 Christian Johansen
630
+ * Copyright (c) 2010-2011 Christian Johansen
631
631
  */
632
632
 
633
633
  (function (sinon) {
@@ -1195,7 +1195,7 @@ var sinon = (function (buster) {
1195
1195
  * @author Christian Johansen (christian@cjohansen.no)
1196
1196
  * @license BSD
1197
1197
  *
1198
- * Copyright (c) 2010-2013 Christian Johansen
1198
+ * Copyright (c) 2010-2011 Christian Johansen
1199
1199
  */
1200
1200
 
1201
1201
  (function (sinon) {
@@ -1566,7 +1566,7 @@ var sinon = (function (buster) {
1566
1566
  * @author Christian Johansen (christian@cjohansen.no)
1567
1567
  * @license BSD
1568
1568
  *
1569
- * Copyright (c) 2010-2013 Christian Johansen
1569
+ * Copyright (c) 2010-2011 Christian Johansen
1570
1570
  */
1571
1571
 
1572
1572
  (function (sinon) {
@@ -1991,7 +1991,7 @@ var sinon = (function (buster) {
1991
1991
  * @author Christian Johansen (christian@cjohansen.no)
1992
1992
  * @license BSD
1993
1993
  *
1994
- * Copyright (c) 2010-2013 Christian Johansen
1994
+ * Copyright (c) 2010-2011 Christian Johansen
1995
1995
  */
1996
1996
 
1997
1997
  (function (sinon) {
@@ -2148,7 +2148,7 @@ var sinon = (function (buster) {
2148
2148
  * @author Christian Johansen (christian@cjohansen.no)
2149
2149
  * @license BSD
2150
2150
  *
2151
- * Copyright (c) 2010-2013 Christian Johansen
2151
+ * Copyright (c) 2010-2011 Christian Johansen
2152
2152
  */
2153
2153
 
2154
2154
  if (typeof sinon == "undefined") {
@@ -2568,7 +2568,7 @@ if (typeof sinon == "undefined") {
2568
2568
  * @author Christian Johansen (christian@cjohansen.no)
2569
2569
  * @license BSD
2570
2570
  *
2571
- * Copyright (c) 2010-2013 Christian Johansen
2571
+ * Copyright (c) 2010-2011 Christian Johansen
2572
2572
  */
2573
2573
 
2574
2574
  if (typeof sinon == "undefined") {
@@ -3044,7 +3044,7 @@ if (typeof module == "object" && typeof require == "function") {
3044
3044
  * @author Christian Johansen (christian@cjohansen.no)
3045
3045
  * @license BSD
3046
3046
  *
3047
- * Copyright (c) 2010-2013 Christian Johansen
3047
+ * Copyright (c) 2010-2011 Christian Johansen
3048
3048
  */
3049
3049
 
3050
3050
  if (typeof sinon == "undefined") {
@@ -3260,7 +3260,7 @@ if (typeof module == "object" && typeof require == "function") {
3260
3260
  * @author Christian Johansen (christian@cjohansen.no)
3261
3261
  * @license BSD
3262
3262
  *
3263
- * Copyright (c) 2010-2013 Christian Johansen
3263
+ * Copyright (c) 2010-2011 Christian Johansen
3264
3264
  */
3265
3265
 
3266
3266
  (function () {
@@ -3340,7 +3340,7 @@ if (typeof module == "object" && typeof require == "function") {
3340
3340
  * @author Christian Johansen (christian@cjohansen.no)
3341
3341
  * @license BSD
3342
3342
  *
3343
- * Copyright (c) 2010-2013 Christian Johansen
3343
+ * Copyright (c) 2010-2011 Christian Johansen
3344
3344
  */
3345
3345
 
3346
3346
  if (typeof module == "object" && typeof require == "function") {
@@ -3464,7 +3464,7 @@ if (typeof module == "object" && typeof require == "function") {
3464
3464
  * @author Christian Johansen (christian@cjohansen.no)
3465
3465
  * @license BSD
3466
3466
  *
3467
- * Copyright (c) 2010-2013 Christian Johansen
3467
+ * Copyright (c) 2010-2011 Christian Johansen
3468
3468
  */
3469
3469
 
3470
3470
  (function (sinon) {
@@ -3537,7 +3537,7 @@ if (typeof module == "object" && typeof require == "function") {
3537
3537
  * @author Christian Johansen (christian@cjohansen.no)
3538
3538
  * @license BSD
3539
3539
  *
3540
- * Copyright (c) 2010-2013 Christian Johansen
3540
+ * Copyright (c) 2010-2011 Christian Johansen
3541
3541
  */
3542
3542
 
3543
3543
  (function (sinon) {
@@ -3634,7 +3634,7 @@ if (typeof module == "object" && typeof require == "function") {
3634
3634
  * @author Christian Johansen (christian@cjohansen.no)
3635
3635
  * @license BSD
3636
3636
  *
3637
- * Copyright (c) 2010-2013 Christian Johansen
3637
+ * Copyright (c) 2010-2011 Christian Johansen
3638
3638
  */
3639
3639
 
3640
3640
  (function (sinon, global) {
@@ -3727,14 +3727,7 @@ if (typeof module == "object" && typeof require == "function") {
3727
3727
  if (!sinon.calledInOrder(arguments)) {
3728
3728
  try {
3729
3729
  expected = [].join.call(arguments, ", ");
3730
- var calls = slice.call(arguments);
3731
- var i = calls.length;
3732
- while (i) {
3733
- if (!calls[--i].called) {
3734
- calls.splice(i, 1);
3735
- }
3736
- }
3737
- actual = sinon.orderByFirstCall(calls).join(", ");
3730
+ actual = sinon.orderByFirstCall(slice.call(arguments)).join(", ");
3738
3731
  } catch (e) {
3739
3732
  // If this fails, we'll just fall back to the blank string
3740
3733
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: konacha-chai-matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-27 00:00:00.000000000 Z
12
+ date: 2013-07-16 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: A set of Chai.js libraries ready to use for Konacha
15
15
  email:
@@ -43,6 +43,7 @@ files:
43
43
  - vendor/assets/javascripts/chai-things.js
44
44
  - vendor/assets/javascripts/chai-timers.js
45
45
  - vendor/assets/javascripts/js-factories.js
46
+ - vendor/assets/javascripts/memo-is.js
46
47
  - vendor/assets/javascripts/mocha-as-promised.js
47
48
  - vendor/assets/javascripts/sinon-chai.js
48
49
  - vendor/assets/javascripts/sinon.js
@@ -59,15 +60,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
60
  - - ! '>='
60
61
  - !ruby/object:Gem::Version
61
62
  version: '0'
63
+ segments:
64
+ - 0
65
+ hash: 2151480695250639257
62
66
  required_rubygems_version: !ruby/object:Gem::Requirement
63
67
  none: false
64
68
  requirements:
65
69
  - - ! '>='
66
70
  - !ruby/object:Gem::Version
67
71
  version: '0'
72
+ segments:
73
+ - 0
74
+ hash: 2151480695250639257
68
75
  requirements: []
69
76
  rubyforge_project: konacha-chai-matchers
70
- rubygems_version: 1.8.15
77
+ rubygems_version: 1.8.24
71
78
  signing_key:
72
79
  specification_version: 3
73
80
  summary: Chai.js plugins collection for Konacha