1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

fix tests on ruby 2.0

This commit is contained in:
John Mair 2012-12-19 12:27:10 +01:00
parent 3d3cf14d3b
commit 3663559291
2 changed files with 8 additions and 9 deletions

View file

@ -408,7 +408,7 @@ describe "commands" do
it 'should create a command in a nested context and that command should be accessible from the parent' do
x = "@x=nil\ncd 7\n_pry_.commands.instance_eval {\ncommand('bing') { |arg| run arg }\n}\ncd ..\nbing ls\nexit-all"
redirect_pry_io(StringIO.new("@x=nil\ncd 7\n_pry_.commands.instance_eval {\ncommand('bing') { |arg| run arg }\n}\ncd ..\nbing ls\nexit-all"), @str_output) do
Pry.new.repl(0)
Pry.new.repl('0')
end
@str_output.string.should =~ /@x/

View file

@ -33,7 +33,12 @@ if !PryTestHelpers.mri18_and_no_real_source_location?
end
it "should be able to find super methods" do
c = Class.new{
b = Class.new{
# daddy initialize!
def initialize(*args) ;end
}
c = Class.new(b){
# classy initialize!
def initialize(*args); end
}
@ -53,13 +58,7 @@ if !PryTestHelpers.mri18_and_no_real_source_location?
t.eval("show-doc o.initialize").should =~ /instancey initialize/
t.eval("show-doc --super o.initialize").should =~ /grungy initialize/
t.eval("show-doc o.initialize -ss").should =~ /classy initialize/
begin
require 'pry-doc'
t.eval("show-doc --super o.initialize -ss").should ==
t.eval("show-doc Object#initialize")
rescue LoadError
end
t.eval("show-doc o.initialize -sss").should =~ /daddy initialize/
end
describe "rdoc highlighting" do