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:
parent
2bb5d64581
commit
b12aa12ed1
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue