From 14572a82b0e0ecacd8149edf13be12b29cab794f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Wed, 21 May 2014 16:57:08 +0200 Subject: [PATCH] test: add a temporary version of must.have.members The proper implementation will be available when the pull request moll/js-must#16 is merged and released. --- test/common.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/common.js b/test/common.js index f8db062..15ebdb4 100644 --- a/test/common.js +++ b/test/common.js @@ -1,6 +1,7 @@ /*jshint latedef:nofunc */ 'use strict'; var generators = require('yeoman-generator'); +var must = require('must'); exports.createGenerator = createGenerator; @@ -17,3 +18,13 @@ function createGenerator(name, path, deps, args, opts) { return env.create(name, { arguments: args || [], options: opts || {} }); } + +// temporary workaround until moll/js-must#16 is released +if (!must.prototype.members) { + must.prototype.members = function members(ary) { + var self = this; + ary.forEach(function(key) { + self.include(key); + }); + }; +}