Sha256: 08fc565e2d1ca140a84dff69c6ce9d230ccf7c3c21bb68a2eecf19852a6e8f9f

Contents?: true

Size: 607 Bytes

Versions: 24

Compression:

Stored size: 607 Bytes

Contents

require 'spec_helper'
require 'bundler/definition'

describe Bundler::Definition do
  before do
    Bundler.stub(:settings){ Bundler::Settings.new(".") }
  end

  describe "#lock" do
    context "when it's not possible to write to the file" do
      subject{ Bundler::Definition.new(nil, [], [], []) }

      before do
        File.should_receive(:open).with("Gemfile.lock", "wb").
          and_raise(Errno::EACCES)
      end

      it "raises an InstallError with explanation" do
        expect{ subject.lock("Gemfile.lock") }.
          to raise_error(Bundler::InstallError)
      end
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
bundler-1.6.0.pre.1 spec/bundler/definition_spec.rb
bundler-1.5.2 spec/bundler/definition_spec.rb
bundler-1.3.6 spec/bundler/definition_spec.rb
bundler-1.5.1 spec/bundler/definition_spec.rb
bundler-1.5.0 spec/bundler/definition_spec.rb
bundler-1.5.0.rc.2 spec/bundler/definition_spec.rb
bundler-1.5.0.rc.1 spec/bundler/definition_spec.rb
bundler-1.4.0.rc.1 spec/bundler/definition_spec.rb
bundler-1.4.0.pre.2 spec/bundler/definition_spec.rb
bundler-1.4.0.pre.1 spec/bundler/definition_spec.rb
bundler-1.3.5 spec/bundler/definition_spec.rb
bundler-1.3.4 spec/bundler/definition_spec.rb
bundler-1.3.3 spec/bundler/definition_spec.rb
bundler-1.3.2 spec/bundler/definition_spec.rb
bundler-1.3.1 spec/bundler/definition_spec.rb
bundler-1.3.0 spec/bundler/definition_spec.rb
bundler-1.3.0.pre.8 spec/bundler/definition_spec.rb
bundler-1.3.0.pre.7 spec/bundler/definition_spec.rb
bundler-1.3.0.pre.6 spec/bundler/definition_spec.rb
bundler-1.3.0.pre.5 spec/bundler/definition_spec.rb