Skip to content

Commit

Permalink
Merge pull request #40 from jjb/test-blank-seconds
Browse files Browse the repository at this point in the history
tests for blank seconds
  • Loading branch information
hsbt authored Nov 7, 2023
2 parents f31321c + 54bc763 commit 008a632
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 008a632

Please sign in to comment.