Merge branch 'master' of https://github.com/chernetsov/jasmine into chernetsov-master

Fix #678 Close #679
This commit is contained in:
slackersoft
2014-09-25 12:55:49 -07:00
4 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -821,7 +821,7 @@ getJasmineRequireObj().Env = function(j$) {
message += error.message || error; message += error.message || error;
} }
currentSpec.addExpectationResult(false, { currentRunnable().addExpectationResult(false, {
matcherName: '', matcherName: '',
passed: false, passed: false,
expected: '', expected: '',
@@ -1490,6 +1490,7 @@ getJasmineRequireObj().MockDate = function() {
} }
function createDateProperties() { function createDateProperties() {
FakeDate.prototype = GlobalDate.prototype;
FakeDate.now = function() { FakeDate.now = function() {
if (GlobalDate.now) { if (GlobalDate.now) {
+1 -1
View File
@@ -389,7 +389,7 @@ describe("Clock (acceptance)", function() {
clock.tick(6); clock.tick(6);
expect(delayedFn1).toHaveBeenCalled(); expect(delayedFn1).toHaveBeenCalled();
expect(delayedFn2).toHaveBeenCalled(); expect(delayedFn2).toHaveBeenCalled();
}); });
it("does not mock the Date object by default", function() { it("does not mock the Date object by default", function() {
+1
View File
@@ -75,6 +75,7 @@ describe("FakeDate", function() {
mockDate.install(); mockDate.install();
expect(new fakeGlobal.Date()).toEqual(jasmine.any(Date)); expect(new fakeGlobal.Date()).toEqual(jasmine.any(Date));
expect(new fakeGlobal.Date() instanceof fakeGlobal.Date).toBe(true);
}); });
it("fakes current time when using Date.now()", function() { it("fakes current time when using Date.now()", function() {
+1
View File
@@ -61,6 +61,7 @@ getJasmineRequireObj().MockDate = function() {
} }
function createDateProperties() { function createDateProperties() {
FakeDate.prototype = GlobalDate.prototype;
FakeDate.now = function() { FakeDate.now = function() {
if (GlobalDate.now) { if (GlobalDate.now) {