Really, really fix ls bug, with spec

This commit is contained in:
Ryan Fitzgerald 2013-11-29 17:14:44 -08:00
parent e63ac30c80
commit 235b65d5b3
2 changed files with 9 additions and 1 deletions

View File

@ -189,7 +189,7 @@ class Pry
object_to_interrogate
else
class << object_to_interrogate
superclass
ancestors.grep(::Class).first
end
end
end

View File

@ -164,6 +164,14 @@ describe "ls" do
autoload :McflurgleTheThird, "/tmp/this-file-d000esnat-exist.rb"
lambda{ pry_eval("ls -c") }.should.not.raise
end
it "should show constants for an object's class regardless of mixins" do
pry_eval(
"cd Pry.new",
"extend Module.new",
"ls -c"
).should.match(/Method/)
end
end
describe "grep" do