Sha256: f72852baed8507e39f60dadf677ea35cf060c058a32d7d8c242d5296e18796e8

Contents?: true

Size: 611 Bytes

Versions: 58

Compression:

Stored size: 611 Bytes

Contents

require 'helper'

describe Pry::InputCompleter do

  before do
    # The AMQP gem has some classes like this:
    #  pry(main)> AMQP::Protocol::Test::ContentOk.name
    #  => :content_ok
    module SymbolyName
      def self.name; :symboly_name; end
    end
  end

  after do
    Object.remove_const :SymbolyName
  end

  # another jruby hack :((
  if !jruby?
    it "should not crash if there's a Module that has a symbolic name." do
      completer = Pry::InputCompleter.build_completion_proc(Pry.binding_for(Object.new))
      lambda{ completer.call "a.to_s." }.should.not.raise Exception
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
pry-0.9.8pre2 test/test_completion.rb
pry-0.9.8pre2-i386-mswin32 test/test_completion.rb
pry-0.9.8pre2-i386-mingw32 test/test_completion.rb
pry-0.9.8pre2-java test/test_completion.rb
pry-0.9.8.0pre1-i386-mswin32 test/test_completion.rb
pry-0.9.8.0pre1-i386-mingw32 test/test_completion.rb
pry-0.9.7.4 test/test_completion.rb
pry-0.9.7.4-i386-mswin32 test/test_completion.rb
pry-0.9.7.4-i386-mingw32 test/test_completion.rb
pry-0.9.7.4-java test/test_completion.rb
pry-0.9.7.3 test/test_completion.rb
pry-0.9.7.3-i386-mswin32 test/test_completion.rb
pry-0.9.7.3-i386-mingw32 test/test_completion.rb
pry-0.9.7.3-java test/test_completion.rb
pry-0.9.7.2 test/test_completion.rb
pry-0.9.7.2-i386-mswin32 test/test_completion.rb
pry-0.9.7.2-i386-mingw32 test/test_completion.rb
pry-0.9.7.2-java test/test_completion.rb
pry-0.9.7.1 test/test_completion.rb
pry-0.9.7.1-i386-mswin32 test/test_completion.rb