summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-01-04 22:07:07 +0900
committerGitHub <noreply@github.com>2019-01-04 22:07:07 +0900
commitc627124526a7f01a3433263ca1668e7ffdb4a37a (patch)
tree3fd2ada5bdb58b512b6421e9aec1c6a3eb1b3f13
parentd7ad2192ff5da41ba70ae9c21ca3e62559081df4 (diff)
parent28e346e4f95551697229104ace51f4a7417b5ed3 (diff)
downloadbundler-c627124526a7f01a3433263ca1668e7ffdb4a37a.tar.gz
Merge pull request #6873 from bundler/pick-missing-commits-for-2-0
Merge #6834 for 2-0-stable
-rw-r--r--spec/bundler/definition_spec.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb
index a38c0b05b0..a27c5b0a54 100644
--- a/spec/bundler/definition_spec.rb
+++ b/spec/bundler/definition_spec.rb
@@ -13,6 +13,7 @@ RSpec.describe Bundler::Definition do
subject { Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) }
it "raises an PermissionError with explanation" do
+ allow(File).to receive(:open).and_call_original
expect(File).to receive(:open).with("Gemfile.lock", "wb").
and_raise(Errno::EACCES)
expect { subject.lock("Gemfile.lock") }.
@@ -23,6 +24,7 @@ RSpec.describe Bundler::Definition do
subject { Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) }
it "raises a TemporaryResourceError with explanation" do
+ allow(File).to receive(:open).and_call_original
expect(File).to receive(:open).with("Gemfile.lock", "wb").
and_raise(Errno::EAGAIN)
expect { subject.lock("Gemfile.lock") }.