summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/lock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/commands/lock_spec.rb')
-rw-r--r--spec/bundler/commands/lock_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/bundler/commands/lock_spec.rb b/spec/bundler/commands/lock_spec.rb
index 6d005cfc96..706eaed533 100644
--- a/spec/bundler/commands/lock_spec.rb
+++ b/spec/bundler/commands/lock_spec.rb
@@ -202,6 +202,25 @@ RSpec.describe "bundle lock" do
expect(read_lockfile).to eq(expected_lockfile)
end
+ it "prints an updated lockfile when there is an outdated lockfile using --print --update" do
+ lockfile outdated_lockfile
+
+ bundle "lock --print --update"
+
+ expect(out).to eq(expected_lockfile.rstrip)
+ end
+
+ it "emits info messages to stderr when updating an outdated lockfile using --print --update" do
+ lockfile outdated_lockfile
+
+ bundle "lock --print --update"
+
+ expect(err).to eq(<<~STDERR.rstrip)
+ Fetching gem metadata from https://gem.repo4/...
+ Resolving dependencies...
+ STDERR
+ end
+
it "writes a lockfile when there is an outdated lockfile and bundle is frozen" do
lockfile outdated_lockfile