Merge pull request #1532 from waldyr/master
Remove exclamation point from non found method
This commit is contained in:
commit
f5c97cac10
|
@ -93,7 +93,7 @@ class Pry
|
|||
end
|
||||
|
||||
def no_definition_message
|
||||
"Couldn't locate a definition for #{obj_name}!"
|
||||
"Couldn't locate a definition for #{obj_name}"
|
||||
end
|
||||
|
||||
# Generate a header (meta-data information) for all the code
|
||||
|
|
|
@ -71,6 +71,13 @@ describe "show-source" do
|
|||
expect(mock_pry(binding, "show-source _c#wrongmethod")).to match(/Couldn't locate/)
|
||||
end
|
||||
|
||||
it "should not show the source and deliver an error message without exclamation point" do
|
||||
_c = Class.new
|
||||
error_message = "Error: Couldn't locate a definition for _c#wrongmethod\n"
|
||||
expect(mock_pry(binding, "show-source _c#wrongmethod")).to eq(error_message)
|
||||
end
|
||||
|
||||
|
||||
it "should find instance_methods if the class overrides instance_method" do
|
||||
_c = Class.new{
|
||||
def method;
|
||||
|
|
Loading…
Reference in New Issue