Skip to content

Commit

Permalink
test for basic functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jjb committed Sep 24, 2021
1 parent 0f12a0e commit 1c6bb90
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 1c6bb90

Please sign in to comment.