summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception
diff options
context:
space:
mode:
authorBenoit Daloze <eregontp@gmail.com>2019-12-27 17:36:07 +0100
committerBenoit Daloze <eregontp@gmail.com>2019-12-27 17:36:07 +0100
commitc74d30e7950f18fd9fadcfa404790e8fb0e891fd (patch)
tree8a23fdfc9d36e4e9fc26d7987a3310f97b920be2 /spec/ruby/core/exception
parent74fdc1e60fb8ba03f5cdb09866c75bbe5dbce936 (diff)
Update to ruby/spec@7241f39
Diffstat (limited to 'spec/ruby/core/exception')
-rw-r--r--spec/ruby/core/exception/exit_value_spec.rb9
-rw-r--r--spec/ruby/core/exception/incomplete_input_spec.rb7
-rw-r--r--spec/ruby/core/exception/reason_spec.rb9
3 files changed, 12 insertions, 13 deletions
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