2019-05-02 18:33:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-10-24 01:58:26 -04:00
|
|
|
describe "show-doc" do
|
|
|
|
before do
|
2019-06-11 12:54:11 -04:00
|
|
|
@obj = Object.new
|
2011-10-15 04:30:20 -04:00
|
|
|
|
2019-06-11 12:54:11 -04:00
|
|
|
# obj docs
|
|
|
|
def @obj.sample_method; end
|
2015-06-30 13:47:38 -04:00
|
|
|
end
|
|
|
|
|
2019-02-16 08:48:32 -05:00
|
|
|
it "emits a deprecation warning" do
|
2019-06-11 12:54:11 -04:00
|
|
|
expect(pry_eval(binding, 'show-doc @obj.sample_method'))
|
2019-02-16 08:48:32 -05:00
|
|
|
.to match(/WARNING: the show-doc command is deprecated/)
|
|
|
|
end
|
|
|
|
|
2019-06-11 12:54:11 -04:00
|
|
|
it "shows docs" do
|
|
|
|
expect(pry_eval(binding, 'show-doc @obj.sample_method')).to match(/obj docs/)
|
2012-04-18 01:19:25 -04:00
|
|
|
end
|
2013-03-06 03:22:20 -05:00
|
|
|
end
|