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

View File

@@ -821,7 +821,7 @@ getJasmineRequireObj().Env = function(j$) {
message += error.message || error;
}
currentSpec.addExpectationResult(false, {
currentRunnable().addExpectationResult(false, {
matcherName: '',
passed: false,
expected: '',
@@ -1490,6 +1490,7 @@ getJasmineRequireObj().MockDate = function() {
}
function createDateProperties() {
FakeDate.prototype = GlobalDate.prototype;
FakeDate.now = function() {
if (GlobalDate.now) {

View File

@@ -389,7 +389,7 @@ describe("Clock (acceptance)", function() {
clock.tick(6);
expect(delayedFn1).toHaveBeenCalled();
expect(delayedFn2).toHaveBeenCalled();
expect(delayedFn2).toHaveBeenCalled();
});
it("does not mock the Date object by default", function() {

View File

@@ -75,6 +75,7 @@ describe("FakeDate", function() {
mockDate.install();
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() {

View File

@@ -61,6 +61,7 @@ getJasmineRequireObj().MockDate = function() {
}
function createDateProperties() {
FakeDate.prototype = GlobalDate.prototype;
FakeDate.now = function() {
if (GlobalDate.now) {