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

Add spec to ls command. When 'ls -M instance' is called, exception should be raised.

This commit is contained in:
yui-knk 2013-12-23 22:53:17 +09:00
parent 2bb5d64581
commit b12aa12ed1

View file

@ -92,6 +92,11 @@ describe "ls" do
test.should.not.raise
end
it "should show error message when instance is given with -M option" do
error = lambda{ pry_eval("ls -M String.new") }.should.raise(Pry::CommandError)
error.message.should.match(/-M only makes sense with a Module or a Class/)
end
# see: https://travis-ci.org/pry/pry/jobs/5071918
unless Pry::Helpers::BaseHelpers.rbx?