Skip to content

Commit 4dc6d5f

Browse files
committed
Add test for #now.
1 parent af8a7f3 commit 4dc6d5f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/async/timeout.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
end
1212
end
1313

14+
with "#now" do
15+
it "can get the current time" do
16+
scheduler.with_timeout(1) do |timeout|
17+
expect(timeout.now).to be >= 0
18+
expect(timeout.now).to be <= timeout.time
19+
end
20+
end
21+
end
22+
1423
with "#adjust" do
1524
it "can adjust the timeout" do
1625
scheduler.with_timeout(1) do |timeout|

0 commit comments

Comments
 (0)