diff options
Diffstat (limited to 'spec/bundler/definition_spec.rb')
-rw-r--r-- | spec/bundler/definition_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/bundler/definition_spec.rb b/spec/bundler/definition_spec.rb index 481c355b..076f2c86 100644 --- a/spec/bundler/definition_spec.rb +++ b/spec/bundler/definition_spec.rb @@ -3,19 +3,19 @@ require "bundler/definition" describe Bundler::Definition do before do - allow(Bundler).to receive(:settings){ Bundler::Settings.new(".") } - allow(Bundler).to receive(:default_gemfile){ Pathname.new("Gemfile") } - allow(Bundler).to receive(:ui){ double("UI", :info => "") } + allow(Bundler).to receive(:settings) { Bundler::Settings.new(".") } + allow(Bundler).to receive(:default_gemfile) { Pathname.new("Gemfile") } + allow(Bundler).to receive(:ui) { double("UI", :info => "") } end describe "#lock" do context "when it's not possible to write to the file" do - subject{ Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) } + subject { Bundler::Definition.new(nil, [], Bundler::SourceList.new, []) } 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") }. + expect { subject.lock("Gemfile.lock") }. to raise_error(Bundler::PermissionError, /Gemfile\.lock/) end end |