From c74d30e7950f18fd9fadcfa404790e8fb0e891fd Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 27 Dec 2019 17:36:07 +0100 Subject: Update to ruby/spec@7241f39 --- spec/ruby/core/exception/exit_value_spec.rb | 9 ++++++--- spec/ruby/core/exception/incomplete_input_spec.rb | 7 ------- spec/ruby/core/exception/reason_spec.rb | 9 ++++++--- 3 files changed, 12 insertions(+), 13 deletions(-) delete mode 100644 spec/ruby/core/exception/incomplete_input_spec.rb (limited to 'spec/ruby/core/exception') diff --git a/spec/ruby/core/exception/exit_value_spec.rb b/spec/ruby/core/exception/exit_value_spec.rb index 8bb3cf898d..99987dd1bc 100644 --- a/spec/ruby/core/exception/exit_value_spec.rb +++ b/spec/ruby/core/exception/exit_value_spec.rb @@ -4,7 +4,10 @@ describe "LocalJumpError#exit_value" do def get_me_a_return Proc.new { return 42 } end - -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| - e.exit_value.should == 42 - } + + it "returns the value given to return" do + -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| + e.exit_value.should == 42 + } + end end diff --git a/spec/ruby/core/exception/incomplete_input_spec.rb b/spec/ruby/core/exception/incomplete_input_spec.rb deleted file mode 100644 index 930a3f01d5..0000000000 --- a/spec/ruby/core/exception/incomplete_input_spec.rb +++ /dev/null @@ -1,7 +0,0 @@ -require_relative '../../spec_helper' - -describe "Encoding::InvalidByteSequenceError#incomplete_input?" do - -> {"abc\xa4def".encode("ISO-8859-1", "EUC-JP") }.should raise_error(Encoding::InvalidByteSequenceError) { |e| - e.incomplete_input?.should == false - } -end diff --git a/spec/ruby/core/exception/reason_spec.rb b/spec/ruby/core/exception/reason_spec.rb index b28cbde8d9..210bbc9725 100644 --- a/spec/ruby/core/exception/reason_spec.rb +++ b/spec/ruby/core/exception/reason_spec.rb @@ -4,7 +4,10 @@ describe "LocalJumpError#reason" do def get_me_a_return Proc.new { return 42 } end - -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| - e.reason.should == :return - } + + it "returns 'return' for a return" do + -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| + e.reason.should == :return + } + end end -- cgit v1.2.3