Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

try to fix tests

  • Loading branch information...
commit 7001a357aaef78306519787a0cca2f7a54973c93 1 parent 743326f
John Mair banister authored
12 test/test_default_commands/test_documentation.rb
View
@@ -250,7 +250,7 @@ def beta
describe "when no class/module arg is given" do
before do
- module Host
+ module TestHost
# hello there froggy
module M
@@ -261,12 +261,12 @@ def e; end
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 @@ def e; end
describe "should skip over broken modules" do
before do
- module Host
+ module TestHost
# hello
module M
@@ -295,11 +295,11 @@ def e; end
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
13 test/test_default_commands/test_show_source.rb
View
@@ -393,17 +393,17 @@ def self.invoked_in_method
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 @@ def e; end
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 @@ def e; end
end
end
end
+
Please sign in to comment.
Something went wrong with that request. Please try again.