Rename j$ to jasmineUnderTest for specs

- Clarifies what it is for when writing tests
- No longer named the same as the `jasmine` that is injected into live
  code
This commit is contained in:
Gregg Van Hove
2015-12-03 17:23:32 -08:00
parent a95c2cfe3f
commit 79206ccff5
60 changed files with 702 additions and 896 deletions

View File

@@ -1,13 +1,13 @@
describe("StringMatching", function() {
it("matches a string against a provided regexp", function() {
var matcher = new j$.StringMatching(/foo/);
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 j$.StringMatching('foo');
var matcher = new jasmineUnderTest.StringMatching('foo');
expect(matcher.asymmetricMatch('barfoobaz')).toBe(true);
expect(matcher.asymmetricMatch('barbaz')).toBe(false);
@@ -15,12 +15,12 @@ describe("StringMatching", function() {
it("raises an Error when the expected is not a String or RegExp", function() {
expect(function() {
new j$.StringMatching({});
new jasmineUnderTest.StringMatching({});
}).toThrowError(/not a String or a RegExp/);
});
it("jasmineToString's itself", function() {
var matching = new j$.StringMatching(/^foo/);
var matching = new jasmineUnderTest.StringMatching(/^foo/);
expect(matching.jasmineToString()).toEqual("<jasmine.stringMatching(/^foo/)>");
});