Skip to content

Commit

Permalink
Default the redirect_pry_io helper's output to an anonymous StringIO.
Browse files Browse the repository at this point in the history
  • Loading branch information
rue committed Sep 8, 2011
1 parent 85123ab commit d200c80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/helper.rb
Expand Up @@ -52,7 +52,11 @@ def another_sample_method
:another_sample
end

def redirect_pry_io(new_in, new_out)
# Set I/O streams.
#
# Out defaults to an anonymous StringIO.
#
def redirect_pry_io(new_in, new_out = StringIO.new)
old_in = Pry.input
old_out = Pry.output

Expand Down

0 comments on commit d200c80

Please sign in to comment.