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
optimacms-0.1.61 spec/dummy/node_modules/bootstrap-tagsinput/lib/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.11.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.5 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.4 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.3 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.10.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.9.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.9.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.8.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.8.1 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.8.0 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.8 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.7 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.6 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.5 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.4 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.3 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js
upjs-rails-0.7.2 spec_app/vendor/assets/bower_components/jasmine/src/core/matchers/toHaveBeenCalled.js