Sha256: 386aaaef5eba6d6033fb94e1c3b669c5b0ea671efc51f68cb04f1ce7f0311160
Contents?: true
Size: 580 Bytes
Versions: 16
Compression:
Stored size: 580 Bytes
Contents
/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ module.exports = function(should, Assertion) { Assertion.add('startWith', function(str, description) { this.params = { operator: 'to start with ' + should.format(str), message: description }; this.assert(0 === this.obj.indexOf(str)); }); Assertion.add('endWith', function(str, description) { this.params = { operator: 'to end with ' + should.format(str), message: description }; this.assert(this.obj.indexOf(str, this.obj.length - str.length) >= 0); }); };
Version data entries
16 entries across 16 versions & 1 rubygems