Skip to content

Commit

Permalink
Merge pull request #1278 from MikeMcQuaid/ruby3
Browse files Browse the repository at this point in the history
Test with Ruby 3
  • Loading branch information
MikeMcQuaid authored Jan 9, 2024
2 parents aeb6ac0 + 5f907c3 commit 6c2c7cd
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.4
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,3 @@ DEPENDENCIES
rspec
simplecov
simplecov-cobertura

BUNDLED WITH
1.17.3
14 changes: 8 additions & 6 deletions spec/bundle_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c2c7cd

Please sign in to comment.