Only gem install bundler if running Ruby 2.5 or below

This commit is contained in:
Parker Moore 2020-07-28 14:51:03 -04:00
Родитель 842eed460d
Коммит c8d3907094
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -27,7 +27,7 @@ RSpec.describe "Pages Gem Integration spec" do
def run_cmd(cmd)
output, status = Open3.capture2e env, *cmd
raise StandardError, output if status.exitstatus != 0
raise StandardError, "Command: #{cmd.inspect}\n\n#{output}" if status.exitstatus != 0
output
end
@ -44,7 +44,9 @@ RSpec.describe "Pages Gem Integration spec" do
def bundle_install
Dir.chdir(source) do
File.unlink "#{gemfile}.lock" if File.exist? "#{gemfile}.lock"
run_cmd %w(gem install bundler)
run_cmd %w(bundle --version)
run_cmd %w(gem install bundler) if RUBY_VERSION < "2.6"
run_cmd %w(bundle --version)
run_cmd %w(bundle install)
end
end