diff --git a/Gemfile b/Gemfile index 1f388f25e..96b686234 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,11 @@ source "https://rubygems.org" gemspec name: "train" +if Gem.ruby_version.to_s.start_with?("2.5") + # 16.7.23 required ruby 2.6+ + gem "chef-utils", "< 16.7.23" # TODO: remove when we drop ruby 2.5 +end + group :test do gem "coveralls", require: false gem "minitest", "~> 5.8" @@ -19,10 +24,12 @@ group :test do gem "mocha", "~> 1.1" end -group :integration do - gem "berkshelf", ">= 6.0" - gem "test-kitchen", ">= 2" - gem "kitchen-vagrant" +if Gem.ruby_version >= Gem::Version.new("2.7.0") + group :integration do + gem "berkshelf", ">= 6.0" + gem "test-kitchen", ">= 2" + gem "kitchen-vagrant" + end end group :tools do diff --git a/test/unit/file/remote/linux_test.rb b/test/unit/file/remote/linux_test.rb index 8fc580dc7..a8cb7d90c 100644 --- a/test/unit/file/remote/linux_test.rb +++ b/test/unit/file/remote/linux_test.rb @@ -44,7 +44,7 @@ def mock_stat(args, out, err = "", code = 0) it "reads file contents" do out = rand.to_s - backend.mock_command('cat /spaced\\ path || echo -n', out) + backend.mock_command("cat /spaced\\ path || echo -n", out) _(cls.new(backend, "/spaced path").content).must_equal out end