Skip to content

Commit

Permalink
Fix a spec failure
Browse files Browse the repository at this point in the history
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)>'
```
  • Loading branch information
znz authored and eregon committed Feb 27, 2021
1 parent d1eeeea commit bdad3e1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions language/predefined_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1271,8 +1271,16 @@ def obj.foo2; yield; end
path.should.end_with?("/etc.#{RbConfig::CONFIG['DLEXT']}")
end

it "raises LoadError if feature cannot be found" do
-> { $LOAD_PATH.resolve_feature_path('noop') }.should raise_error(LoadError)
ruby_version_is "2.7"..."3.1" do
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

0 comments on commit bdad3e1

Please sign in to comment.