Sha256: 484d185335537d504d4b0ff4402c8f080f52bb88533ac188bc0e88817947cdc6

Contents?: true

Size: 678 Bytes

Versions: 67

Compression:

Stored size: 678 Bytes

Contents

require 'helper'

describe "Pry.run_command" do
  before do
    o = Object.new
    def o.drum
      "roken is dodelijk"
    end
    @context = Pry.binding_for(o)
  end

  it 'performs a simple ls' do
    @context.eval("hokey_pokey = 10")
    Pry.run_command "ls", :context => @context, :output => out = StringIO.new
    out.string.should =~ /hokey_pokey/
  end

  if !PryTestHelpers.mri18_and_no_real_source_location?
    # This is a regression test as 0.9.11 broke this behaviour
    it 'can perform a show-source' do
      Pry.run_command "show-source drum", :context => @context, :output => out = StringIO.new
      out.string.should =~ /roken is dodelijk/
    end
  end
end

Version data entries

67 entries across 67 versions & 5 rubygems

Version Path
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/pry-0.9.12.6/spec/run_command_spec.rb
pry-0.9.12.6 spec/run_command_spec.rb
pry-0.9.12.6-i386-mswin32 spec/run_command_spec.rb
pry-0.9.12.6-i386-mingw32 spec/run_command_spec.rb
pry-0.9.12.6-java spec/run_command_spec.rb
pry-0.9.12.5 spec/run_command_spec.rb
pry-0.9.12.5-i386-mswin32 spec/run_command_spec.rb
pry-0.9.12.5-i386-mingw32 spec/run_command_spec.rb
pry-0.9.12.5-java spec/run_command_spec.rb
pry-0.9.12.4 spec/run_command_spec.rb
pry-0.9.12.4-i386-mswin32 spec/run_command_spec.rb
pry-0.9.12.4-i386-mingw32 spec/run_command_spec.rb
pry-0.9.12.4-java spec/run_command_spec.rb
pry-0.9.12.3 spec/run_command_spec.rb
pry-0.9.12.3-i386-mswin32 spec/run_command_spec.rb
pry-0.9.12.3-i386-mingw32 spec/run_command_spec.rb
pry-0.9.12.3-java spec/run_command_spec.rb
torquebox-console-0.3.0 vendor/bundle/jruby/1.9/gems/pry-0.9.12-java/spec/run_command_spec.rb
sshp-0.0.2 vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/run_command_spec.rb
sshp-0.0.1 vendor/ruby/1.9.1/gems/pry-0.9.12.2/spec/run_command_spec.rb