1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fix a spec failure

http://ci.rvm.jp/logfiles/brlog.trunk-test.20210216-182358
```
1)
$LOAD_PATH.resolve_feature_path raises LoadError if feature cannot be found FAILED
Expected LoadError but no exception was raised (nil was returned)
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1275:in `block (3 levels) in <top (required)>'
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1259:in `block in <top (required)>'
/tmp/ruby/v3/src/trunk-test/spec/ruby/language/predefined_spec.rb:1258:in `<top (required)>'
```
This commit is contained in:
Kazuhiro NISHIYAMA 2021-02-16 18:49:48 +09:00
parent 1a84c07715
commit 96228e3ed6
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -1271,8 +1271,16 @@ ruby_version_is "2.7" do
path.should.end_with?("/etc.#{RbConfig::CONFIG['DLEXT']}") path.should.end_with?("/etc.#{RbConfig::CONFIG['DLEXT']}")
end end
it "raises LoadError if feature cannot be found" do ruby_version_is "2.7"..."3.1" do
-> { $LOAD_PATH.resolve_feature_path('noop') }.should raise_error(LoadError) it "raises LoadError if feature cannot be found" do
-> { $LOAD_PATH.resolve_feature_path('noop') }.should raise_error(LoadError)
end
end
ruby_version_is "3.1" do
it "return nil if feature cannot be found" do
$LOAD_PATH.resolve_feature_path('noop').should be_nil
end
end end
end end
end end