aboutsummaryrefslogtreecommitdiffstats
path: root/spec/lock/svn_spec.rb
blob: 8c2db1eb2c53174e65f33e4ee8106395054aad2a (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 lock with svn gems" do
  before :each do
    build_svn "foo"

    install_gemfile <<-G
      gem 'foo', :svn => "file://#{lib_path('foo-1.0')}"
    G
  end

  it "doesn't break right after running lock" do
    should_be_installed "foo 1.0.0"
  end

  it "locks a svn source to the current ref" do
    update_svn "foo" do |s|
      s.write "lib/foo.rb", "puts :CACHE"
    end
    bundle :install

    run <<-RUBY
      require 'foo'
    RUBY

    expect(out).not_to eq("CACHE")
  end

  it "provides correct #full_gem_path" do
    run <<-RUBY
      puts Bundler.rubygems.find_name('foo').first.full_gem_path
    RUBY
    expect(out).to eq(bundle("show foo"))
  end
end