Sha256: 0cff76c35f83f2aff8f560610a779e1613ab60799633605d842ead49ba163ac6

Contents?: true

Size: 695 Bytes

Versions: 3

Compression:

Stored size: 695 Bytes

Contents

// This is a lightweight bridge between Smoke and Screw.Unit.
// It shadows mocking and stubbing onto the matchers to make them available within tests.

Screw.Matchers.mock = function(m) {
  return Smoke.Mock(m);
};

Screw.Matchers.mock_function = function(func,name) {
  return Smoke.MockFunction(func,name);
};

Screw.Matchers.stub = function(obj, attr) {
  return new Smoke.Stub(obj,attr);
};

(function($) {
  $(Screw).bind("before", function(){
    function checkAndResetSmoke() {
      Smoke.checkExpectations();
      Smoke.reset();
    }

    $('.it').bind('passed', function(){ checkAndResetSmoke() });
    $('.it').bind('failed', function(){ checkAndResetSmoke() });
  });
})(jQuery);

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
drogus-blue-ridge-0.0.3 lib/screw.mocking.js
drogus-blue-ridge-0.0.2 lib/screw.mocking.js
drogus-blue-ridge-0.0.1 lib/screw.mocking.js