Sha256: 68834282db89c7506504413e04dfcbcaae6750afda0d86c917643d9c3d83b3a5
Contents?: true
Size: 816 Bytes
Versions: 1
Compression:
Stored size: 816 Bytes
Contents
describe("toEqual", function() { it("delegates to equals function", function() { var util = { equals: jasmine.createSpy('delegated-equals').and.callReturn(true) }, matcher = j$.matchers.toEqual(util), result; result = matcher.compare(1, 1); expect(util.equals).toHaveBeenCalledWith(1, 1, []); expect(result.pass).toBe(true); }); it("delegates custom equality testers, if present", function() { var util = { equals: jasmine.createSpy('delegated-equals').and.callReturn(true) }, customEqualityTesters = ['a', 'b'], matcher = j$.matchers.toEqual(util, customEqualityTesters), result; result = matcher.compare(1, 1); expect(util.equals).toHaveBeenCalledWith(1, 1, ['a', 'b']); expect(result.pass).toBe(true); }); });
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jasmine-core-2.0.0.rc2 | ./lib/jasmine-core/spec/core/matchers/toEqualSpec.js |