Sha256: 764be5c2f2b01e4440fd29536bbb988eb0f6ed6f1da1a63b597be15fac021713

Contents?: true

Size: 1.09 KB

Versions: 44

Compression:

Stored size: 1.09 KB

Contents

require "spec_helper"

describe ".bundle/config" do
  before :each do
    gemfile <<-G
      source "file://#{gem_repo1}"
      gem "rack", "1.0.0"
    G
  end

  it "can be moved with an environment variable" do
    ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
    bundle "install --path vendor/bundle"

    bundled_app('.bundle').should_not exist
    tmp('foo/bar/config').should exist
    should_be_installed "rack 1.0.0"
  end

  it "can provide a relative path with the environment variable" do
    FileUtils.mkdir_p bundled_app('omg')
    Dir.chdir bundled_app('omg')

    ENV['BUNDLE_APP_CONFIG'] = "../foo"
    bundle "install --path vendor/bundle"

    bundled_app(".bundle").should_not exist
    bundled_app("../foo/config").should exist
    should_be_installed "rack 1.0.0"
  end

  it "removes environment.rb from BUNDLE_APP_CONFIG's path" do
    FileUtils.mkdir_p(tmp('foo/bar'))
    ENV['BUNDLE_APP_CONFIG'] = tmp('foo/bar').to_s
    bundle "install"
    FileUtils.touch tmp('foo/bar/environment.rb')
    should_be_installed "rack 1.0.0"
    tmp('foo/bar/environment.rb').should_not exist
  end
end

Version data entries

44 entries across 44 versions & 4 rubygems

Version Path
bundler-1.1.pre.10 spec/other/config_spec.rb
bundler-1.1.pre.9 spec/other/config_spec.rb
bundler-1.0.20.rc spec/other/config_spec.rb
bundler-1.0.19.rc spec/other/config_spec.rb
bundler-1.0.18 spec/other/config_spec.rb
bundler-1.1.pre.8 spec/other/config_spec.rb
bundler-1.0.17 spec/other/config_spec.rb
bundler-1.1.pre.7 spec/other/config_spec.rb
bundler-1.1.pre.5 spec/other/config_spec.rb
bundler-1.0.15 spec/other/config_spec.rb
bundler-1.0.14 spec/other/config_spec.rb
bundler-1.1.pre.4 spec/other/config_spec.rb
bundler-1.0.13 spec/other/config_spec.rb
bundler-1.1.pre.3 spec/other/config_spec.rb
bundler-1.1.pre.2 spec/other/config_spec.rb
bundler-1.0.12 spec/other/config_spec.rb
bundler-1.0.11 spec/other/config_spec.rb
bundler_package_git-1.1.pre.1 spec/other/config_spec.rb
bundler-1.1.pre.1 spec/other/config_spec.rb
bundler-1.0.10 spec/other/config_spec.rb