Minor version changes
This commit is contained in:
@@ -517,7 +517,7 @@ jasmine.version_= {
|
|||||||
"major": 0,
|
"major": 0,
|
||||||
"minor": 9,
|
"minor": 9,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 0
|
"revision": 1
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* @namespace
|
* @namespace
|
||||||
@@ -610,12 +610,9 @@ jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
|
|||||||
|
|
||||||
jasmine.Env.prototype.version = function () {
|
jasmine.Env.prototype.version = function () {
|
||||||
if (jasmine.version_) {
|
if (jasmine.version_) {
|
||||||
return parseInt(jasmine.version_.major + "" +
|
return jasmine.version_;
|
||||||
jasmine.version_.minor + "" +
|
|
||||||
jasmine.version_.build + "" +
|
|
||||||
jasmine.version_.revision + "");
|
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
throw new Error('Version not set');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
describe("base", function() {
|
|
||||||
describe("version", function() {
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
+39
-10
@@ -8,16 +8,45 @@ describe("jasmine.Env", function() {
|
|||||||
fakeReporter = jasmine.createSpyObj("fakeReporter", ["log"]);
|
fakeReporter = jasmine.createSpyObj("fakeReporter", ["log"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("version should return the current version as an int", function() {
|
describe('version', function () {
|
||||||
var oldVersion = jasmine.version_;
|
var oldVersion;
|
||||||
jasmine.version_ = {
|
|
||||||
"major": 1,
|
beforeEach(function () {
|
||||||
"minor": 9,
|
oldVersion = jasmine.version_;
|
||||||
"build": 7,
|
});
|
||||||
"revision": 8
|
|
||||||
};
|
afterEach(function () {
|
||||||
expect(env.version()).toEqual(1978);
|
jasmine.version_ = oldVersion;
|
||||||
jasmine.version_ = oldVersion;
|
});
|
||||||
|
|
||||||
|
it('should raise an error if version is not set', function () {
|
||||||
|
jasmine.version_ = null;
|
||||||
|
var exception;
|
||||||
|
try {
|
||||||
|
env.version();
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
exception = e;
|
||||||
|
}
|
||||||
|
expect(exception.message).toEqual('Version not set');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
it("version should return the current version as an int", function() {
|
||||||
|
jasmine.version_ = {
|
||||||
|
"major": 1,
|
||||||
|
"minor": 9,
|
||||||
|
"build": 7,
|
||||||
|
"revision": 8
|
||||||
|
};
|
||||||
|
expect(env.version()).toEqual({
|
||||||
|
"major": 1,
|
||||||
|
"minor": 9,
|
||||||
|
"build": 7,
|
||||||
|
"revision": 8
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should allow reporters to be registered", function() {
|
it("should allow reporters to be registered", function() {
|
||||||
|
|||||||
+2
-5
@@ -30,12 +30,9 @@ jasmine.Env.prototype.clearInterval = jasmine.clearInterval;
|
|||||||
|
|
||||||
jasmine.Env.prototype.version = function () {
|
jasmine.Env.prototype.version = function () {
|
||||||
if (jasmine.version_) {
|
if (jasmine.version_) {
|
||||||
return parseInt(jasmine.version_.major + "" +
|
return jasmine.version_;
|
||||||
jasmine.version_.minor + "" +
|
|
||||||
jasmine.version_.build + "" +
|
|
||||||
jasmine.version_.revision + "");
|
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
throw new Error('Version not set');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -2,5 +2,5 @@
|
|||||||
"major": 0,
|
"major": 0,
|
||||||
"minor": 9,
|
"minor": 9,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 0
|
"revision": 1
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user