diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7bd2bb9d7..2919e8db5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,6 @@ jobs: - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '2.6' bundler-cache: true - name: Run RSpec tests diff --git a/.rubocop.yml b/.rubocop.yml new file mode 120000 index 000000000..d39231d53 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1 @@ +../../../.rubocop.yml \ No newline at end of file diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..0aec50e6e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.1.4 diff --git a/Gemfile.lock b/Gemfile.lock index a38e7d5ff..9143cca34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -48,6 +48,3 @@ DEPENDENCIES rspec simplecov simplecov-cobertura - -BUNDLED WITH - 1.17.3 diff --git a/spec/bundle_utils_spec.rb b/spec/bundle_utils_spec.rb index 7ae77b84c..c2d519537 100644 --- a/spec/bundle_utils_spec.rb +++ b/spec/bundle_utils_spec.rb @@ -14,16 +14,18 @@ end context "when the system call fails" do - before do - allow_any_instance_of(Process::Status).to receive(:success?).and_return(false) - end - it "emits all stdout output even if verbose is false" do - expect { described_class.system "echo", "foo", verbose: false }.to output("foo\n").to_stdout_from_any_process + expect do + described_class.system "/bin/bash", "-c", "echo foo && false", + verbose: false + end.to output("foo\n").to_stdout_from_any_process end it "emits all stdout output only once if verbose is true" do - expect { described_class.system "echo", "foo", verbose: true }.to output("foo\n").to_stdout_from_any_process + expect do + described_class.system "/bin/bash", "-c", "echo foo && true", + verbose: true + end.to output("foo\n").to_stdout_from_any_process end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 407095d89..bc6d8ed65 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -70,7 +70,7 @@ def linux? RSpec::Support::ObjectFormatter.default_instance.max_formatted_output_length = nil config.around do |example| - Bundler.with_clean_env { example.run } + Bundler.with_original_env { example.run } end config.before(:each, :needs_linux) do