mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
improve error message; add testcase for #1461
This commit is contained in:
parent
99e701efd4
commit
4172635d00
2 changed files with 7 additions and 1 deletions
|
@ -15,7 +15,7 @@ class Pry
|
|||
|
||||
def process(spec)
|
||||
unless spec
|
||||
return output.puts "Enter the method name you want to look up."
|
||||
return output.puts "Please provide a class, module, or method name (e.g: ri Array#push)"
|
||||
end
|
||||
|
||||
# Lazily load RI
|
||||
|
|
6
spec/commands/ri_command_spec.rb
Normal file
6
spec/commands/ri_command_spec.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
require_relative '../helper'
|
||||
describe "ri" do
|
||||
it "prints an error message without an argument" do
|
||||
expect(pry_eval("ri")).to include("Please provide a class, module, or method name (e.g: ri Array#push)")
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue