fixed tests for host that were too specific to begin with

This commit is contained in:
Spencer Alger
2014-04-01 18:07:01 -07:00
parent 47f0e52cb2
commit b1ee674613
3 changed files with 37 additions and 41 deletions

View File

@ -0,0 +1,12 @@
var _ = require('lodash-node');
var expect = require('expect.js');
module.exports = function expectSubObject(obj, subObj) {
_.forOwn(subObj, function (val, prop) {
if (typeof obj[prop] === 'object') {
// non-strict equals
expect(obj[prop]).to.eql(val, 'Expected property' + prop + ' of object to equal ' + val);
} else {
expect(obj).property(prop, val);
}
});
};