From b10b37924aef33426ea6e2fda5ce17804796ecc4 Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Mon, 25 May 2020 20:12:41 +0900 Subject: [PATCH] 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 `': uninitialized constant Bundler::CLI (NameError) from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `' 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 `
' Commands: $ ruby -w /home/user/snapshot-master/lib/bundler/cli/add.rb:4:in `': uninitialized constant Bundler::CLI (NameError) from /home/user/snapshot-master/lib/bundler/cli/add.rb:3:in `' 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 `
' # $? => 1 ``` --- spec/bundler/quality_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb index faeeedff5f..31b71269b1 100644 --- a/spec/bundler/quality_spec.rb +++ b/spec/bundler/quality_spec.rb @@ -234,6 +234,7 @@ RSpec.describe "The library itself" do files_to_require = lib_tracked_files.grep(/\.rb$/) - exclusions 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.sort! sys_exec!("ruby -w") do |input, _, _| files_to_require.each do |f| input.puts "require '#{f}'"