aboutsummaryrefslogtreecommitdiffstats
path: root/spec/bundler/bundler/definition_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/bundler/bundler/definition_spec.rb')
-rw-r--r--spec/bundler/bundler/definition_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/bundler/bundler/definition_spec.rb b/spec/bundler/bundler/definition_spec.rb
index dcdde75315..5f8b88a101 100644
--- a/spec/bundler/bundler/definition_spec.rb
+++ b/spec/bundler/bundler/definition_spec.rb
@@ -31,6 +31,16 @@ RSpec.describe Bundler::Definition do
to raise_error(Bundler::TemporaryResourceError, /temporarily unavailable/)
end
end
+ context "when Bundler::Definition.no_lock is set to true" do
+ subject { Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) }
+ before { Bundler::Definition.no_lock = true }
+ after { Bundler::Definition.no_lock = false }
+
+ it "does not create a lock file" do
+ subject.lock("Gemfile.lock")
+ expect(File.file?("Gemfile.lock")).to eq false
+ end
+ end
end
describe "detects changes" do