Sha256: 2e78a5d8bafe6935858853ad6aec1da11070ac869702a9fb141d83da5c6d081a

Contents?: true

Size: 743 Bytes

Versions: 40

Compression:

Stored size: 743 Bytes

Contents

getJasmineRequireObj().toHaveBeenCalled = function(j$) {

  function toHaveBeenCalled() {
    return {
      compare: function(actual) {
        var result = {};

        if (!j$.isSpy(actual)) {
          throw new Error('Expected a spy, but got ' + j$.pp(actual) + '.');
        }

        if (arguments.length > 1) {
          throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith');
        }

        result.pass = actual.calls.any();

        result.message = result.pass ?
          'Expected spy ' + actual.and.identity() + ' not to have been called.' :
          'Expected spy ' + actual.and.identity() + ' to have been called.';

        return result;
      }
    };
  }

  return toHaveBeenCalled;
};

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
upjs-rails-0.7.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.5 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.4 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.3 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.6.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.5.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.4.4 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.4.3 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.4.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.4.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.4.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.3.3 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.3.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.3.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.2.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.2.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.2.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js