Skip to content

Commit

Permalink
add test which reproduces Shopify#50
Browse files Browse the repository at this point in the history
  • Loading branch information
ashkulz committed Jan 24, 2023
1 parent cbe861d commit ca871d4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/bootboot_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,21 @@ def test_bundle_install_with_different_ruby_updating_gemfile_next_lock_succeeds
end
end

def test_bundle_install_without_specific_ruby_version_succeeds
write_gemfile do |file, _dir|
# transforms "2.7.7" into "~> 2.7.0" for a non-exact ruby requirement
requirement = "~> #{RUBY_VERSION.rpartition(".")[0]}.0"
FileUtils.cp("#{file.path}.lock", gemfile_next(file))
File.write(file, <<-EOM, mode: "a")
ruby '#{requirement}'
EOM

run_bundle_command("install", file.path)
run_bundle_command("install", file.path, env: { "DEPENDENCIES_NEXT" => "1" })
self.assertions += 2 # both commands have succeeded
end
end

def test_bundle_install_with_different_ruby_for_installing_gemfile_next_lock_fails
skip("broken with a newer version of bundler")

Expand Down

0 comments on commit ca871d4

Please sign in to comment.