Add spec to ls command. When 'ls -M instance' is called, exception should be raised.
This commit is contained in:
parent
2bb5d64581
commit
b12aa12ed1
|
@ -92,6 +92,11 @@ describe "ls" do
|
||||||
test.should.not.raise
|
test.should.not.raise
|
||||||
end
|
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
|
# see: https://travis-ci.org/pry/pry/jobs/5071918
|
||||||
unless Pry::Helpers::BaseHelpers.rbx?
|
unless Pry::Helpers::BaseHelpers.rbx?
|
||||||
|
|
Loading…
Reference in New Issue