lib/sinon-expect.js
function(){
    var i = 0, len = SinonExpect.assertions.length,
        matcher;

    for(i, len; i < len; i++){
      matcher = SinonExpect.assertions[i];
      (function(matcher){
        SinonExpect.SinonAssertions.prototype[matcher] = function(){
          var args = Array.prototype.slice.call(arguments),
              sinon = SinonExpect._sinon;

          args.unshift(this.obj);

          sinon.assert[matcher].apply(
            sinon.assert,
            args
          );
        };
      }(matcher));
    }
  }
function(){
    var i = 0, len = SinonExpect.assertions.length,
        matcher;

    for(i, len; i < len; i++){
      matcher = SinonExpect.assertions[i];
      (function(matcher){
        SinonExpect.SinonAssertions.prototype[matcher] = function(){
          var args = Array.prototype.slice.call(arguments),
              sinon = SinonExpect._sinon;

          args.unshift(this.obj);

          sinon.assert[matcher].apply(
            sinon.assert,
            args
          );
        };
      }(matcher));
    }
  }
function ( ) { var i = 0 , len = SinonExpect . assertions . length , matcher ; for ( i , len ; i < len ; i ++ ) { matcher = SinonExpect . assertions [ i ] ; ( function ( matcher ) { SinonExpect . SinonAssertions . prototype [ matcher ] = function ( ) { var args = Array . prototype . slice . call ( arguments ) , sinon = SinonExpect . _sinon ; args . unshift ( this . obj ) ; sinon . assert [ matcher ] . apply ( sinon . assert , args ) ; } ; } ( matcher ) ) ; } }
Creates sinon matchers on the SinonExpect.SinonAssertions prototype.
This could also be done on including the file but I prefer
keeping it in a method.

@private
Creates sinon matchers on the SinonExpect . SinonAssertions prototype . This could also be done on including the file but I prefer keeping it in a method .