Skip to content

Commit

Permalink
Merge pull request #319 from evanp/assert-not-includes
Browse files Browse the repository at this point in the history
Correct assignment for assert.notInclude() synonym assert.notIncludes()
  • Loading branch information
indexzero committed Nov 4, 2014
2 parents f18b325 + 875f0d3 commit ad95bef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/assert/macros.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ assert.notInclude = function (actual, expected, message) {
assert.fail(actual, expected, message || "expected {actual} not to include {expected}", "include", assert.notInclude);
}
};
assert.notIncludes = assert.notIncludes;
assert.notIncludes = assert.notInclude;

assert.deepInclude = function (actual, expected, message) {
if (!isArray(actual)) {
Expand Down
5 changes: 4 additions & 1 deletion test/assert-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ vows.describe('vows/assert').addBatch({
assertError(assert.isNotEmpty, {});
assertError(assert.isNotEmpty, []);
assertError(assert.isNotEmpty, "");
},
"`notIncludes`": function () {
assert.notIncludes([1, 2, 3], 4);
assert.notIncludes({"red": 1, "blue": 2}, "green");
}
}
}).export(module);
Expand All @@ -134,4 +138,3 @@ function assertError(assertion, args, fail) {
"expected an AssertionError for {actual}",
"assertError", assertError);
}

0 comments on commit ad95bef

Please sign in to comment.