Sha256: f6dc4aa8848ddd38a410d6269b6ece6658f8774d9c5ae79c8aca104f1bc9ad19
Contents?: true
Size: 959 Bytes
Versions: 23
Compression:
Stored size: 959 Bytes
Contents
describe("StringMatching", function() { it("matches a string against a provided regexp", function() { var matcher = new jasmineUnderTest.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 jasmineUnderTest.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 jasmineUnderTest.StringMatching({}); }).toThrowError(/not a String or a RegExp/); }); it("jasmineToString's itself", function() { var matching = new jasmineUnderTest.StringMatching(/^foo/); expect(matching.jasmineToString()).toEqual("<jasmine.stringMatching(/^foo/)>"); }); });
Version data entries
23 entries across 20 versions & 2 rubygems