Sha256: e6c4dac4b7db78a91eefe377d82df69637d85a662b4e9f2acd1a1d3c9e6e5d5a

Contents?: true

Size: 899 Bytes

Versions: 55

Compression:

Stored size: 899 Bytes

Contents

describe("toContain", function() {
  it("delegates to j$.matchersUtil.contains", function() {
    var util = {
        contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
      },
      matcher = j$.matchers.toContain(util),
      result;

    result = matcher.compare("ABC", "B");
    expect(util.contains).toHaveBeenCalledWith("ABC", "B", []);
    expect(result.pass).toBe(true);
  });

  it("delegates to j$.matchersUtil.contains, passing in equality testers if present", function() {
    var util = {
        contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
      },
      customEqualityTesters = ['a', 'b'],
      matcher = j$.matchers.toContain(util, customEqualityTesters),
      result;

    result = matcher.compare("ABC", "B");
    expect(util.contains).toHaveBeenCalledWith("ABC", "B", ['a', 'b']);
    expect(result.pass).toBe(true);
  });
});

Version data entries

55 entries across 55 versions & 4 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/bootstrap-tagsinput/lib/jasmine/spec/core/matchers/toContainSpec.js
tdiary-5.0.2 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.1 vendor/bundle/gems/jasmine-core-2.4.1/lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.4.1 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.4.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
upjs-rails-0.11.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.5 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.4 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.3 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.10.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.9.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.9.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.8.2 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.8.1 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.8.0 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.7.8 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.7.7 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js
upjs-rails-0.7.6 spec_app/vendor/assets/bower_components/jasmine/spec/core/matchers/toContainSpec.js