Skip to content

Commit

Permalink
spec/pry_defaults: silence unwanted deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kyrylo committed May 28, 2019
1 parent cc9523d commit 4744ec7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pry/pry_instance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def select_prompt

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"
Expand Down
3 changes: 3 additions & 0 deletions spec/pry_defaults_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
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
Expand Down

0 comments on commit 4744ec7

Please sign in to comment.