Skip to content

Commit

Permalink
Fix execution spec with cucumber on ruby 3.4
Browse files Browse the repository at this point in the history
Cucumber is broken on ruby 3.4 currently, requires the fix in
cucumber/cucumber-ruby#1757
(not released yet).

Use their master from git on ruby 3.4 and unpend the test.
  • Loading branch information
p committed Nov 18, 2024
1 parent 672f309 commit 5e06e38
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit 5e06e38

Please sign in to comment.