diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-11-29 15:50:28 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-11-29 15:50:28 +0100 |
commit | 67a1e2258974df4b597d019739595c18fbb9a7c1 (patch) | |
tree | 992ad4fc0fc08a6af8f04373703a339f957eb143 /spec/ruby/core/exception/errno_spec.rb | |
parent | e6d93a27afa058319e6dad093bbef637e49fce47 (diff) |
Update to ruby/spec@7f22a0b
Diffstat (limited to 'spec/ruby/core/exception/errno_spec.rb')
-rw-r--r-- | spec/ruby/core/exception/errno_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/exception/errno_spec.rb b/spec/ruby/core/exception/errno_spec.rb index 095a926e09..a063e522ea 100644 --- a/spec/ruby/core/exception/errno_spec.rb +++ b/spec/ruby/core/exception/errno_spec.rb @@ -56,3 +56,12 @@ describe "Errno::ENOTSUP" do end end end + +describe "Errno::ENOENT" do + it "lets subclasses inherit the default error message" do + c = Class.new(Errno::ENOENT) + raise c, "custom message" + rescue => e + e.message.should == "No such file or directory - custom message" + end +end |