Skip to content
Browse files

Accept StringIO as a possible fake response body

Note that this makes FakeWeb compatible with the Artifice gem.
  • Loading branch information...
1 parent 27d0552 commit 0d69c71734dad2e5771d40148f40486a03fafe53 @larrytheliquid larrytheliquid committed Apr 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/fake_web/ext/net_http.rb
View
2 lib/fake_web/ext/net_http.rb
@@ -11,7 +11,7 @@ def initialize_with_fakeweb(io, debug_output = nil)
@debug_output = debug_output
@io = case io
- when Socket, OpenSSL::SSL::SSLSocket, IO
+ when Socket, OpenSSL::SSL::SSLSocket, StringIO, IO
io
when String
if !io.include?("\0") && File.exists?(io) && !File.directory?(io)

0 comments on commit 0d69c71

Please sign in to comment.
Something went wrong with that request. Please try again.