Skip to content

Commit

Permalink
stubbing io on stubbed socket
Browse files Browse the repository at this point in the history
  • Loading branch information
trusche committed Jul 21, 2019
1 parent c372c5f commit c4b232b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/webmock/http_lib_adapters/net_http.rb
Expand Up @@ -251,6 +251,13 @@ def close
def readuntil(*args)
end

def io
@io ||= StubIO.new
end

class StubIO
def setsockopt(*args); end
end
end

module Net #:nodoc: all
Expand Down

0 comments on commit c4b232b

Please sign in to comment.