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

Fix failures in ./spec/bundler/quality_spec.rb

```
Failures:

  1) The library itself does not contain any warnings
     Failure/Error: raise "Invoking #{method}!(#{args.map(&:inspect).join(", ")}) failed:\n#{last_command.stdboth}"

     RuntimeError:
       Invoking sys_exec!("ruby -w") failed:
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'

       Commands:
       $ ruby -w
       /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `<module:Bundler>': uninitialized constant Bundler::CLI (NameError)
        from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `<top (required)>'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from /home/user/snapshot-master/lib/rubygems/core_ext/kernel_require.rb:91:in `require'
        from -:2:in `<main>'
       # $? => 1
```
This commit is contained in:
Kazuhiro NISHIYAMA 2020-05-25 20:12:41 +09:00
parent fcc8be0198
commit b10b37924a
No known key found for this signature in database
GPG key ID: 262ED8DBB4222F7A

View file

@ -234,6 +234,7 @@ RSpec.describe "The library itself" do
files_to_require = lib_tracked_files.grep(/\.rb$/) - exclusions files_to_require = lib_tracked_files.grep(/\.rb$/) - exclusions
files_to_require.reject! {|f| f.start_with?("lib/bundler/vendor") } files_to_require.reject! {|f| f.start_with?("lib/bundler/vendor") }
files_to_require.map! {|f| File.expand_path(f, source_root) } files_to_require.map! {|f| File.expand_path(f, source_root) }
files_to_require.sort!
sys_exec!("ruby -w") do |input, _, _| sys_exec!("ruby -w") do |input, _, _|
files_to_require.each do |f| files_to_require.each do |f|
input.puts "require '#{f}'" input.puts "require '#{f}'"