Skip to content

Commit

Permalink
Treat StringIO in WebMockNetBufferedIO properly
Browse files Browse the repository at this point in the history
  • Loading branch information
fxposter committed Nov 7, 2012
1 parent e2c2e27 commit af2634c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webmock/http_lib_adapters/net_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def initialize(io, debug_output = nil)
@debug_output = debug_output

@io = case io
when Socket, OpenSSL::SSL::SSLSocket, IO
when Socket, OpenSSL::SSL::SSLSocket, IO, StringIO
io
when String
StringIO.new(io)
Expand Down

1 comment on commit af2634c

@cbartlett
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, ran into this when transitioning to Artifice from Webmock.

Please sign in to comment.