Sha256: 44ed214e8b88abeb2ded3beab079f8727a318b8e000d9d424c7f771ef3a5550c

Contents?: true

Size: 615 Bytes

Versions: 12

Compression:

Stored size: 615 Bytes

Contents

require 'minitest/autorun'
require 'config/environment'

# Pry testing stuff (taken from Pry itself)

Pry.color = false

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

def mock_pry(*args)
  binding = args.first.is_a?(Binding) ? args.shift : binding()
  input   = StringIO.new(args.join("\n"))
  output  = StringIO.new

  redirect_pry_io(input, output) do
    Pry.start(binding, :hooks => Pry::Hooks.new)
  end

  output.string
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
pry-rails-0.3.11 spec/spec_helper.rb
pry-rails-0.3.10 spec/spec_helper.rb
chatops-rpc-0.0.2 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/pry-rails-0.3.9/spec/spec_helper.rb
chatops-rpc-0.0.1 fixtures/chatops-controller-example/vendor/bundle/ruby/2.5.0/gems/pry-rails-0.3.9/spec/spec_helper.rb
pry-rails-0.3.9 spec/spec_helper.rb
pry-rails-0.3.8 spec/spec_helper.rb
pry-rails-0.3.7 spec/spec_helper.rb
pry-rails-0.3.6 spec/spec_helper.rb
pry-rails-0.3.5 spec/spec_helper.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/pry-rails-0.3.4/spec/spec_helper.rb
pry-rails-0.3.4 spec/spec_helper.rb
pry-rails-0.3.3 spec/spec_helper.rb