test/progressrus_test.rb in progressrus-0.1.4 vs test/progressrus_test.rb in progressrus-0.1.5
- old
+ new
@@ -82,9 +82,14 @@
def test_eta_should_return_nil_if_no_count
progress = Progressrus.new
assert_nil progress.eta
end
+ def test_eta_should_return_nil_if_no_total
+ progress = Progressrus.new(total: nil)
+ assert_nil progress.eta
+ end
+
def test_eta_should_return_time_in_future_based_on_time_elapsed
time = Time.now
@progress.tick(10, now: time - 10)
eta = @progress.eta(now: time)