summaryrefslogtreecommitdiff
path: root/spec/install/invalid_spec.rb
blob: fbf41bf419e99a40f8900d9d134bdf120ddd2f38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require "spec_helper"

describe "bundle install with deprecated features" do
  before :each do
    in_app_root
  end

  it "reports that lib is an invalid option" do
    gemfile <<-G
      gem "rack", :lib => "rack"
    G

    bundle :install
    expect(out).to match(/You passed :lib as an option for gem 'rack', but it is invalid/)
  end

end

describe "bundle install to a dead symlink" do
  before do
    in_app_root do
      `ln -s /tmp/idontexist bundle`
    end
  end

  it "reports the symlink is dead" do
    gemfile <<-G
      source "file://#{gem_repo1}"
      gem "rack"
    G

    bundle "install --path bundle"
    expect(out).to match(/invalid symlink/)
  end
end