summaryrefslogtreecommitdiff
path: root/spec/bundler/rubygems_integration_spec.rb
blob: decc3d6fa174032a0aa90c5f7084449103a559f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "spec_helper"

describe Bundler::RubygemsIntegration do
  it "uses the same chdir lock as rubygems", :rubygems => "2.1" do
    expect(Bundler.rubygems.ext_lock).to eq(Gem::Ext::Builder::CHDIR_MONITOR)
  end

  context "#validate" do
    let(:spec) { double("spec", :summary => "") }

    it "skips overly-strict gemspec validation", :rubygems => "< 1.7" do
      expect(spec).to_not receive(:validate)
      Bundler.rubygems.validate(spec)
    end

    it "validates with packaging mode disabled", :rubygems => "1.7" do
      expect(spec).to receive(:validate).with(false)
      Bundler.rubygems.validate(spec)
    end
  end
end