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

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/pry-byebug-1.3.3/test/test_helper.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/pry-byebug-1.3.3/test/test_helper.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/pry-byebug-1.3.3/test/test_helper.rb
pry-byebug-1.3.3 test/test_helper.rb
pry-byebug-1.3.2 test/test_helper.rb
pry-byebug-1.3.1 test/test_helper.rb
pry-byebug-1.3.0 test/test_helper.rb
pry-byebug-1.2.1 test/test_helper.rb
pry-byebug-1.2.0 test/test_helper.rb
pry-byebug-1.1.2 test/test_helper.rb
pry-byebug-1.1.1 test/test_helper.rb