Sha256: f73a4cf98b8c2f2b58235e648a6b41ca714d12b9e81a6a7b1283f7eff5a41934

Contents?: true

Size: 1.05 KB

Versions: 46

Compression:

Stored size: 1.05 KB

Contents

describe("Any", function() {
  it("matches a string", function() {
    var any = new j$.Any(String);

    expect(any.jasmineMatches("foo")).toBe(true);
  });

  it("matches a number", function() {
    var any = new j$.Any(Number);

    expect(any.jasmineMatches(1)).toBe(true);
  });

  it("matches a function", function() {
    var any = new j$.Any(Function);

    expect(any.jasmineMatches(function(){})).toBe(true);
  });

  it("matches an Object", function() {
    var any = new j$.Any(Object);

    expect(any.jasmineMatches({})).toBe(true);
  });
  
  it("matches a Boolean", function() {
    var any = new j$.Any(Boolean);

    expect(any.jasmineMatches(true)).toBe(true);
  });

  it("matches another constructed object", function() {
    var Thing = function() {},
      any = new j$.Any(Thing);

    expect(any.jasmineMatches(new Thing())).toBe(true);
  });

  it("jasmineToString's itself", function() {
    var any = new j$.Any(Number);

    expect(any.jasmineToString()).toMatch('<jasmine.any');
    expect(any.jasmineToString()).toMatch('Number');
  });

});

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/bootstrap-tagsinput/lib/jasmine/spec/core/AnySpec.js
upjs-rails-0.11.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.5 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.4 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.3 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.10.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.9.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.9.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.8.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.8.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.8.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.8 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.7 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.6 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.5 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.4 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.3 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js
upjs-rails-0.7.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/AnySpec.js