Sha256: af2cce3846ab20ef2ae96744367c02ebe494a82a9ee5408267f6228aefb14a99

Contents?: true

Size: 598 Bytes

Versions: 9

Compression:

Stored size: 598 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.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

9 entries across 9 versions & 2 rubygems

Version Path
rsutphin-shenandoah-0.1.0 lib/shenandoah/javascript/common/screw.mocking.js
rsutphin-shenandoah-0.1.1 lib/shenandoah/javascript/common/screw.mocking.js
rsutphin-shenandoah-0.1.2 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.2.0 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.1.3 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.1.0 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.1.1 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.1.2 lib/shenandoah/javascript/common/screw.mocking.js
shenandoah-0.0.0 lib/shenandoah/javascript/common/screw.mocking.js