mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
use HEREDOC's to improve readability of eval string.
This commit is contained in:
parent
82dc33445c
commit
9c3d2899eb
1 changed files with 8 additions and 7 deletions
|
@ -11,18 +11,19 @@ describe "Readline" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "is not loaded on requiring 'pry'" do
|
it "is not loaded on requiring 'pry'" do
|
||||||
`#@ruby -I #@pry_dir -e '
|
code = <<-RUBY
|
||||||
require "pry"
|
require "pry"
|
||||||
p defined? Readline
|
p defined?(Readline)
|
||||||
'`.should == "nil\n"
|
RUBY
|
||||||
|
`#@ruby -I #@pry_dir -e '#{code}'`.should == "nil\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
it "is loaded on invoking 'pry'" do
|
it "is loaded on invoking 'pry'" do
|
||||||
`#@ruby -I #@pry_dir -e '
|
code = <<-RUBY
|
||||||
require "pry"
|
require "pry"
|
||||||
Pry.start self, input: StringIO.new("exit-all\n"), output: StringIO.new
|
Pry.start self, input: StringIO.new("exit-all\n"), output: StringIO.new
|
||||||
puts # put newline after ANSI junk printed by readline
|
puts defined?(Readline)
|
||||||
p defined?(Readline)
|
RUBY
|
||||||
'`.split("\n").last.should == '"constant"'
|
`#@ruby -I #@pry_dir -e '#{code}'`.end_with?("constant\n").should == true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue