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

20 lines
425 B
Ruby
Raw Normal View History

# frozen_string_literal: true
describe "show-doc" do
before do
@obj = Object.new
# obj docs
def @obj.sample_method; end
end
it "emits a deprecation warning" do
expect(pry_eval(binding, 'show-doc @obj.sample_method'))
.to match(/WARNING: the show-doc command is deprecated/)
end
it "shows docs" do
expect(pry_eval(binding, 'show-doc @obj.sample_method')).to match(/obj docs/)
end
end