Sha256: d7ada2d09b89739cb071f55adcd5819ff617d6500143da5f5b4a913f1dbbc49f

Contents?: true

Size: 955 Bytes

Versions: 23

Compression:

Stored size: 955 Bytes

Contents

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

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

  it("delegates to jasmineUnderTest.matchersUtil.contains, passing in equality testers if present", function() {
    var util = {
        contains: jasmine.createSpy('delegated-contains').and.returnValue(true)
      },
      customEqualityTesters = ['a', 'b'],
      matcher = jasmineUnderTest.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

23 entries across 20 versions & 2 rubygems

Version Path
tdiary-5.0.8 vendor/bundle/gems/tdiary-5.0.7/vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.99.1 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-3.0.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.99.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.9.1 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.9.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.7 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.6 vendor/bundle/gems/jasmine-core-2.8.0/lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.8.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.7.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.5 vendor/bundle/gems/tdiary-5.0.4/vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.3/lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.5 vendor/bundle/gems/jasmine-core-2.6.4/lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.6.4 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.6.3 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.6.2 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.6.1 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
jasmine-core-2.6.0 ./lib/jasmine-core/spec/core/matchers/toContainSpec.js
tdiary-5.0.4 vendor/bundle/gems/jasmine-core-2.5.2/lib/jasmine-core/spec/core/matchers/toContainSpec.js