diff options
author | Franz Liedke <franz@develophp.org> | 2023-12-02 19:54:44 +0100 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-12 01:08:19 +0000 |
commit | 0ec88b54f34ee0b0197f963ad6a98a2390a91de7 (patch) | |
tree | 36fcb0dbb2a683ad1b218df69ad7e3e9ef034923 /spec/bundler/commands | |
parent | 8c2480c9edf7d20505a8c3491ec84a3fdd77bd2e (diff) |
[rubygems/rubygems] bundle lock: Always touch the lockfile
https://github.com/rubygems/rubygems/commit/fd2e71dfdb
Diffstat (limited to 'spec/bundler/commands')
-rw-r--r-- | spec/bundler/commands/lock_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb index cf34dc641c..7ea7649caa 100644 --- a/spec/bundler/commands/lock_spec.rb +++ b/spec/bundler/commands/lock_spec.rb @@ -95,6 +95,22 @@ RSpec.describe "bundle lock" do expect(out).to eq(remove_checksums_from_lockfile(@lockfile).chomp) end + it "touches the lockfile when there is an existing lockfile that does not need changes" do + lockfile @lockfile + + expect do + bundle "lock" + end.to change { bundled_app_lock.mtime } + end + + it "does not touch lockfile with --print" do + lockfile @lockfile + + expect do + bundle "lock --print" + end.not_to change { bundled_app_lock.mtime } + end + it "writes a lockfile when there is an outdated lockfile using --update" do lockfile remove_checksums_from_lockfile(@lockfile.gsub("2.3.2", "2.3.1"), " (2.3.1)") |