test/mock/mock_socket.rb in ruby-net-nntp-0.2.1 vs test/mock/mock_socket.rb in ruby-net-nntp-0.2.2

- old
+ new

@@ -4,14 +4,21 @@ super @io = ["200 Welcome\r\n"] @authenticated = false @group_selected = nil @last_article = nil + @is_closed = false end - def alive? + + def closed? super - true + @is_closed + end + + def close + super + @is_closed=true end def recv(len) return readline end