Sha256: 02a985416ef2b079bbdd86d74d274ff6f1923f81bee9a55a05c833d77d381f0e

Contents?: true

Size: 1.34 KB

Versions: 25

Compression:

Stored size: 1.34 KB

Contents

(function($) {
  $(Screw)
    .bind('loaded', function() {    
      $('.describe, .it')
        .click(function() {
          document.location = location.href.split('?')[0] + '?' + $(this).fn('selector');
          return false;
        })
        .focus(function() {
          return $(this).addClass('focused');
        })
        .bind('scroll', function() {
          document.body.scrollTop = $(this).offset().top;
        });

      $('.it')
        .bind('enqueued', function() {
          $(this).addClass('enqueued');
        })
        .bind('running', function() {
          $(this).addClass('running');
        })
        .bind('passed', function() {
          $(this).addClass('passed');
        })
        .bind('failed', function(e, reason) {
          $(this)
            .addClass('failed')
            .append($('<p class="error">').text(reason.toString()));

          var file = reason.fileName || reason.sourceURL;
          var line = reason.lineNumber || reason.line;          
          if (file || line) {
            $(this).append($('<p class="error"></p>').text('line ' + line + ', ' + file));
          }
        });
    })
    .bind('before', function() {
      Screw.suite_start_time = new Date();
      $('.status').text('Running...');
    })
    .bind('after', function() {
      $('body .status').fn('display');
    });
})(jQuery);

Version data entries

25 entries across 25 versions & 6 rubygems

Version Path
pivotal-screw-unit-0.4.0 core/lib/screw.events.js
pivotal-screw-unit-0.4.1 core/lib/screw.events.js
pivotal-screw-unit-0.4.2 core/lib/screw.events.js
pivotal-screw-unit-0.4.3 core/lib/screw.events.js
pivotal-screw-unit-0.5.0 core/lib/screw.events.js
pivotal-screw-unit-0.5.1 core/lib/screw.events.js
pivotal-screw-unit-0.5.2 core/lib/screw.events.js
pivotal-screw-unit-0.5.3 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.10 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.11 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.12 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.3 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.4 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.5 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.6 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.7 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.8 core/lib/screw.events.js
pivotal-screw-unit-server-0.5.9 core/lib/screw.events.js
honkster-screw-unit-server-0.6.3 core/lib/screw.events.js
honkster-screw-unit-server-0.6.2 core/lib/screw.events.js