summaryrefslogtreecommitdiff
path: root/spec/cache/path_spec.rb
blob: 120512487d917802085dd71d84450c87b7557856 (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
require "spec_helper"

describe "bundle cache" do
  describe "with path sources" do
    it "is silent when the path is within the bundle" do
      build_lib "foo", :path => bundled_app("lib/foo")

      install_gemfile <<-G
        gem "foo", :path => '#{bundled_app("lib/foo")}'
      G

      bundle "cache"
      out.should match /Updating .gem files in vendor\/cache/
    end

    it "warns when the path is outside of the bundle" do
      build_lib "foo"

      install_gemfile <<-G
        gem "foo", :path => '#{lib_path("foo-1.0")}'
      G

      bundle "cache"
      out.should include("foo at `#{lib_path("foo-1.0")}` will not be cached")
    end
  end
end