Files
jasmine/spec/core/TimerSpec.js
Gregg Van Hove and Tim Jarratt 1c19b8e38a Move spec files back out of spec/javascripts
- Jasmine gem allows us to specify a path to jasmine.yml via ENV

[finish #58126010]
2013-10-02 16:32:35 -07:00

14 lines
319 B
JavaScript

describe("Timer", function() {
it("reports the time elapsed", function() {
var fakeNow = jasmine.createSpy('fake Date.now'),
timer = new j$.Timer({now: fakeNow});
fakeNow.and.returnValue(100);
timer.start();
fakeNow.and.returnValue(200);
expect(timer.elapsed()).toEqual(100);
});
});