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

spec/pry_defaults: silence unwanted deprecation warnings

This commit is contained in:
Kyrylo Silin 2019-05-28 21:14:50 +03:00
parent cc9523dee0
commit 4744ec7565
2 changed files with 4 additions and 1 deletions

View file

@ -478,7 +478,7 @@ class Pry
unless @prompt_warn
@prompt_warn = true
warn(
Kernel.warn(
"warning: setting prompt with help of " \
"`Pry.config.prompt = [proc {}, proc {}]` is deprecated. " \
"Use Pry::Prompt API instead"

View file

@ -13,6 +13,9 @@ describe "test Pry defaults" do
end
describe "input" do
# Silence deprecation warnings.
before { allow(Kernel).to receive(:warn) }
it 'should set the input default, and the default should be overridable' do
Pry.config.input = InputTester.new("5")
Pry.config.output = @str_output