diff --git a/spec/datadog/core/environment/execution_spec.rb b/spec/datadog/core/environment/execution_spec.rb index 9169eb4ae4b..9d0d42455e7 100644 --- a/spec/datadog/core/environment/execution_spec.rb +++ b/spec/datadog/core/environment/execution_spec.rb @@ -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') @@ -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