Skip to content

Commit

Permalink
remove possibly racy EOFError checking
Browse files Browse the repository at this point in the history
Also fix the order of the new IOError and EOFError tests
  • Loading branch information
Asmod4n committed Dec 9, 2015
1 parent 0ad7ad4 commit b7eb10d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/hiredis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,11 @@
hiredis.del("mruby-hiredis-test:foo")
end

assert("Throws EOFError when Server closed connection") do
hiredis = Hiredis.new
hiredis.call(:quit)
assert_raise(EOFError) { hiredis.get("foo") }
end

assert("Defines IOError when missing") do
assert_equal(IOError.superclass, StandardError)
assert_equal(StandardError, IOError.superclass)
end

assert("Defines EOFError when missing") do
assert_equal(EOFError.superclass, IOError)
assert_equal(IOError, EOFError.superclass)
end

0 comments on commit b7eb10d

Please sign in to comment.