Sha256: 776ec281d90a69b0bdeea9f7c7e21526a63af60d4f5ea16b736a4d231db892df

Contents?: true

Size: 700 Bytes

Versions: 14

Compression:

Stored size: 700 Bytes

Contents

var customMatchers = {
  // custom jasmine-jquery matchers
  // TODO: write as extension to jasmine-jquery
  toHaveEvent: function(eventType){
    return (this.actual.data('events')) && (typeof this.actual.data('events')[eventType] == 'object');
  },
  toHaveLive: function(eventType) {
    var hasLive, actual = this.actual;
    $.each($(document).data('events')['live'], function(i, item) {          
      hasLive = ((item.selector == actual.selector) && (item.origType == eventType));
      if (hasLive) return false;          
    });        
    return hasLive;
  },
  // other jasmine matchers
  toBeInstanceOf: function(instanceType) {
    return this.actual instanceof instanceType;
  }
};

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
judge-1.5.0 spec/javascripts/helpers/customMatchers.js
judge-1.4.0 spec/javascripts/helpers/customMatchers.js
judge-1.3.0 spec/javascripts/helpers/customMatchers.js
judge-1.2.0 spec/javascripts/helpers/customMatchers.js
judge-1.1.0 spec/javascripts/helpers/customMatchers.js
judge-1.0.0 spec/javascripts/helpers/customMatchers.js
judge-0.5.0 spec/javascripts/helpers/customMatchers.js
judge-0.4.3 spec/javascripts/helpers/customMatchers.js
judge-0.4.2 spec/javascripts/helpers/customMatchers.js
judge-0.4.1 spec/javascripts/helpers/customMatchers.js
judge-0.4.0 spec/javascripts/helpers/customMatchers.js
judge-0.3.1 spec/javascripts/helpers/customMatchers.js
judge-0.3.0 spec/javascripts/helpers/customMatchers.js
judge-0.2.0 spec/javascripts/helpers/customMatchers.js