diff --git a/test/test_default_commands/test_documentation.rb b/test/test_default_commands/test_documentation.rb index d5c0e780..ce06a303 100644 --- a/test/test_default_commands/test_documentation.rb +++ b/test/test_default_commands/test_documentation.rb @@ -250,7 +250,7 @@ if !mri18_and_no_real_source_location? describe "when no class/module arg is given" do before do - module Host + module TestHost # hello there froggy module M @@ -261,12 +261,12 @@ if !mri18_and_no_real_source_location? end after do - Object.remove_const(:Host) + Object.remove_const(:TestHost) end it 'should return doc for current module' do redirect_pry_io(InputTester.new("show-doc"), out = StringIO.new) do - Pry.start(Host::M) + Pry.start(TestHost::M) end out.string.should =~ /hello there froggy/ @@ -277,7 +277,7 @@ if !mri18_and_no_real_source_location? describe "should skip over broken modules" do before do - module Host + module TestHost # hello module M @@ -295,11 +295,11 @@ if !mri18_and_no_real_source_location? end after do - Object.remove_const(:Host) + Object.remove_const(:TestHost) end it 'should return doc for first valid module' do - redirect_pry_io(InputTester.new("show-doc Host::M"), out = StringIO.new) do + redirect_pry_io(InputTester.new("show-doc TestHost::M"), out = StringIO.new) do Pry.start end diff --git a/test/test_default_commands/test_show_source.rb b/test/test_default_commands/test_show_source.rb index ba539bb3..49a9052e 100644 --- a/test/test_default_commands/test_show_source.rb +++ b/test/test_default_commands/test_show_source.rb @@ -393,17 +393,17 @@ if !mri18_and_no_real_source_location? out.string.should =~ /\d:\s*def beta/ end - describe "should skip over broken modules" do + describe "should skip over broken modules" do before do - module Host + module BabyDuck - module M + module Muesli binding.eval("def a; end", "dummy.rb", 1) binding.eval("def b; end", "dummy.rb", 2) binding.eval("def c; end", "dummy.rb", 3) end - module M + module Muesli def d; end def e; end end @@ -411,11 +411,11 @@ if !mri18_and_no_real_source_location? end after do - Object.remove_const(:Host) + Object.remove_const(:BabyDuck) end it 'should return source for first valid module' do - redirect_pry_io(InputTester.new("show-source Host::M"), out = StringIO.new) do + redirect_pry_io(InputTester.new("show-source BabyDuck::Muesli"), out = StringIO.new) do Pry.start end @@ -429,3 +429,4 @@ if !mri18_and_no_real_source_location? end end end +