summaryrefslogtreecommitdiff
path: root/spec/commands/lock_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/commands/lock_spec.rb')
-rw-r--r--spec/commands/lock_spec.rb15
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/commands/lock_spec.rb b/spec/commands/lock_spec.rb
index 0b77605f01..f4997b0620 100644
--- a/spec/commands/lock_spec.rb
+++ b/spec/commands/lock_spec.rb
@@ -93,7 +93,7 @@ RSpec.describe "bundle lock" do
bundle "lock --lockfile=lock"
expect(out).to match(/Writing lockfile to.+lock/)
- expect(read_lockfile "lock").to eq(@lockfile)
+ expect(read_lockfile("lock")).to eq(@lockfile)
expect { read_lockfile }.to raise_error(Errno::ENOENT)
end
@@ -122,6 +122,19 @@ RSpec.describe "bundle lock" do
expect(read_lockfile).to eq(@lockfile)
end
+ it "can lock without downloading gems" do
+ gemfile <<-G
+ source "file://#{gem_repo1}"
+
+ gem "thin"
+ gem "rack_middleware", :group => "test"
+ G
+ bundle! "config set without test"
+ bundle! "config set path .bundle"
+ bundle! "lock"
+ expect(bundled_app(".bundle")).not_to exist
+ end
+
# see update_spec for more coverage on same options. logic is shared so it's not necessary
# to repeat coverage here.
context "conservative updates" do