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:
parent
cc9523dee0
commit
4744ec7565
2 changed files with 4 additions and 1 deletions
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue