diff options
author | Carl Lerche <carllerche@mac.com> | 2010-07-21 17:17:58 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2010-07-21 17:26:56 -0700 |
commit | be1c947d1a1244cb9fdc04e61c9bd1ed8a20085c (patch) | |
tree | 71571f21452e4b8e6e04b57f04435559aebc226d | |
parent | 9bcd608373d172ad10a07343381899e34baffe0c (diff) | |
download | bundler-be1c947d1a1244cb9fdc04e61c9bd1ed8a20085c.tar.gz |
Add a spec that explicitly tests craziness
-rw-r--r-- | spec/install/path_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb index d82e2223f0..ba4dff63ea 100644 --- a/spec/install/path_spec.rb +++ b/spec/install/path_spec.rb @@ -304,5 +304,32 @@ describe "bundle install with explicit source paths" do should_be_installed "foo 1.0", "bar 1.0" end + + it "switches the source when the gem existed in rubygems and the path was already being used for another gem" do + build_lib "foo", "1.0", :path => lib_path("foo") + build_gem "bar", "1.0", :to_system => true do |s| + s.write "lib/bar.rb", "raise 'fail'" + end + + install_gemfile <<-G + source "http://#{gem_repo1}" + gem "bar" + path "#{lib_path('foo')}" do + gem "foo" + end + G + + build_lib "bar", "1.0", :path => lib_path("foo/bar") + + install_gemfile <<-G + source "http://#{gem_repo1}" + path "#{lib_path('foo')}" do + gem "foo" + gem "bar" + end + G + + should_be_installed "bar 1.0" + end end end |