I\'m testing a function that takes a date as an optional argument. I want to assert that a new Date object is created if the function is called without the argument.
for me it worked with:
spyOn(Date, 'now').and.callFake(function() { return _currdate; });
instead of .andCallFake (using "grunt-contrib-jasmine": "^0.6.5", that seems to include jasmine 2.0.0)
.andCallFake