Sha256: 852ac0cc582a512f8640386a3af71be586e9211da79d16f05ef7100333cb9797
Contents?: true
Size: 589 Bytes
Versions: 11
Compression:
Stored size: 589 Bytes
Contents
require 'pry/test/helper' require 'minitest/autorun' require 'pry-byebug' require 'mocha/setup' # 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 Pry.input = new_in Pry.output = new_out begin yield ensure Pry.input = old_in Pry.output = old_out end end class InputTester def initialize(*actions) @orig_actions = actions.dup @actions = actions end def readline(*) @actions.shift end def rewind @actions = @orig_actions.dup end end
Version data entries
11 entries across 11 versions & 2 rubygems