Skip to content

Commit

Permalink
Merge pull request #5 from jjb/basic-test
Browse files Browse the repository at this point in the history
test for basic functionality
  • Loading branch information
hsbt authored Sep 27, 2021
2 parents 0f12a0e + 1c6bb90 commit d86230b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_timeout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
require 'timeout'

class TestTimeout < Test::Unit::TestCase

def test_non_timing_out_code_is_successful
assert_nothing_raised do
assert_equal :ok, Timeout.timeout(1){ :ok }
end
end

def test_queue
q = Thread::Queue.new
assert_raise(Timeout::Error, "[ruby-dev:32935]") {
Expand Down

0 comments on commit d86230b

Please sign in to comment.