Sha256: edb5f4edce39e8483f30805a44b4bdc6c7d00c31ef0cf433c28c827f0571beec
Contents?: true
Size: 903 Bytes
Versions: 9
Compression:
Stored size: 903 Bytes
Contents
describe("StringMatching", function() { it("matches a string against a provided regexp", function() { var matcher = new j$.StringMatching(/foo/); expect(matcher.asymmetricMatch('barfoobaz')).toBe(true); expect(matcher.asymmetricMatch('barbaz')).toBe(false); }); it("matches a string against provided string", function() { var matcher = new j$.StringMatching('foo'); expect(matcher.asymmetricMatch('barfoobaz')).toBe(true); expect(matcher.asymmetricMatch('barbaz')).toBe(false); }); it("raises an Error when the expected is not a String or RegExp", function() { expect(function() { new j$.StringMatching({}); }).toThrowError(/not a String or a RegExp/); }); it("jasmineToString's itself", function() { var matching = new j$.StringMatching(/^foo/); expect(matching.jasmineToString()).toEqual("<jasmine.stringMatching(/^foo/)>"); }); });
Version data entries
9 entries across 9 versions & 2 rubygems