summaryrefslogtreecommitdiff
path: root/spec/bundler/definition_spec.rb
diff options
context:
space:
mode:
authorRoque Pinel <repinel@gmail.com>2015-06-03 18:07:26 -0500
committerRoque Pinel <repinel@gmail.com>2015-06-08 20:41:42 -0400
commitdc4814da118b7167b37e7a5b40a74f143ddf0524 (patch)
tree72bce410d4481ff26116831fea81d67787c443d5 /spec/bundler/definition_spec.rb
parentc04b06f2bb86451da9ee6a8b82f932c50bd54ecf (diff)
downloadbundler-dc4814da118b7167b37e7a5b40a74f143ddf0524.tar.gz
Improves the message displayed when cannot create config
Add the `PermissionError` for file permission issues
Diffstat (limited to 'spec/bundler/definition_spec.rb')
-rw-r--r--spec/bundler/definition_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb
index f411471cde..f5865da8ef 100644
--- a/spec/bundler/definition_spec.rb
+++ b/spec/bundler/definition_spec.rb
@@ -12,11 +12,11 @@ describe Bundler::Definition do
context "when it's not possible to write to the file" do
subject{ Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) }
- it "raises an InstallError with explanation" do
+ it "raises an PermissionError with explanation" do
expect(File).to receive(:open).with("Gemfile.lock", "wb").
and_raise(Errno::EACCES)
expect{ subject.lock("Gemfile.lock") }.
- to raise_error(Bundler::InstallError)
+ to raise_error(Bundler::PermissionError, /Gemfile\.lock/)
end
end
end