Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix execution spec with cucumber on ruby 3.4 #4128

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions spec/datadog/core/environment/execution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,13 @@ def test_it_does_something_useful

gemfile(true) do
source 'https://rubygems.org'
gem 'cucumber', '>= 3'
if RUBY_VERSION >= '3.4'
# Cucumber is broken on Ruby 3.4, requires the fix in
# https://github.com/cucumber/cucumber-ruby/pull/1757
gem 'cucumber', '>= 3', git: 'https://github.com/cucumber/cucumber-ruby'
else
gem 'cucumber', '>= 3'
end
end

load Gem.bin_path('cucumber', 'cucumber')
Expand All @@ -192,8 +198,6 @@ def test_it_does_something_useful
Open3.capture3('ruby', stdin_data: script)
end

# Ruby 3.4 outputs an exception instead of the information to be asserted because of the forked process.
pending('Pending for Ruby 3.4.') if RUBY_VERSION.start_with?('3.4.')
expect(err).to include('ACTUAL:true')
end
end
Expand Down
Loading