From 5f59150ebc654308c04d3190dec4fef2b54f41ff Mon Sep 17 00:00:00 2001 From: Tony Hsu Date: Thu, 13 Feb 2025 14:24:49 +0100 Subject: [PATCH] Fix cucumber --- .../datadog/core/environment/execution_spec.rb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/spec/datadog/core/environment/execution_spec.rb b/spec/datadog/core/environment/execution_spec.rb index 0cda18a9b00..c4f2ff7bcd8 100644 --- a/spec/datadog/core/environment/execution_spec.rb +++ b/spec/datadog/core/environment/execution_spec.rb @@ -170,26 +170,12 @@ def test_it_does_something_useful let(:script) do <<-'RUBY' - # Under Ruby 3.0 through 3.2 there is a weird error that occurs - # in CI where two copies of psych get loaded in the same process, - # and even more strangely the first version is a newer one from - # gem and the second one is the older one from Ruby standard - # library. Try to work around this situation by forcing psych - # to be loaded from (some) gem. - # We still don't know exactly what is causing the original issue. - gem 'psych' - require 'bundler/inline' gemfile(true) do source 'https://rubygems.org' - 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 + + gem 'cucumber', '>= 3', '<= 9.2.1' end load Gem.bin_path('cucumber', 'cucumber')