diff options
author | Kyrylo Silin <silin@kyrylo.org> | 2019-05-28 21:14:50 +0300 |
---|---|---|
committer | Kyrylo Silin <silin@kyrylo.org> | 2019-05-28 21:17:25 +0300 |
commit | 4744ec75658814fcf5b55924852dd1726c36aed9 (patch) | |
tree | 488d777f4c704b5c1342b136f2b87560b95f1035 | |
parent | cc9523dee0435d6efa8de7413ebf056a2a50854e (diff) | |
download | pry-test-suite-silence-warnings.tar.gz |
spec/pry_defaults: silence unwanted deprecation warningstest-suite-silence-warnings
-rw-r--r-- | lib/pry/pry_instance.rb | 2 | ||||
-rw-r--r-- | spec/pry_defaults_spec.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/pry/pry_instance.rb b/lib/pry/pry_instance.rb index fd1fc800..9ccca364 100644 --- a/lib/pry/pry_instance.rb +++ b/lib/pry/pry_instance.rb @@ -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" diff --git a/spec/pry_defaults_spec.rb b/spec/pry_defaults_spec.rb index 816481ff..fa0b8c1a 100644 --- a/spec/pry_defaults_spec.rb +++ b/spec/pry_defaults_spec.rb @@ -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 |