Skip to content

Commit

Permalink
tests for blank seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
jjb committed Jul 9, 2023
1 parent 03873a9 commit 54bc763
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ def test_non_timing_out_code_is_successful
end
end

def test_allows_zero_seconds
assert_nothing_raised do
assert_equal :ok, Timeout.timeout(0){:ok}
end
end

def test_allows_nil_seconds
assert_nothing_raised do
assert_equal :ok, Timeout.timeout(nil){:ok}
end
end

def test_included
c = Class.new do
include Timeout
Expand Down

0 comments on commit 54bc763

Please sign in to comment.