diff --git a/lib/bundler/source.rb b/lib/bundler/source.rb index b374fdd89ed..d83ee148a37 100644 --- a/lib/bundler/source.rb +++ b/lib/bundler/source.rb @@ -317,7 +317,6 @@ def hash def eql?(o) o.instance_of?(Path) && path.expand_path(Bundler.root) == o.path.expand_path(Bundler.root) && - name == o.name && version == o.version end diff --git a/spec/install/path_spec.rb b/spec/install/path_spec.rb index 3f2bde8e818..a8124217aa3 100644 --- a/spec/install/path_spec.rb +++ b/spec/install/path_spec.rb @@ -141,6 +141,26 @@ should_be_installed "rack 1.0" end + it "doesn't automatically unlock dependencies when using the gemspec syntax" do + build_lib "foo", "1.0", :path => lib_path("foo") do |s| + s.add_dependency "rack", ">= 1.0" + end + + Dir.chdir lib_path("foo") + + install_gemfile lib_path("foo/Gemfile"), <<-G + source "file://#{gem_repo1}" + gemspec + G + + build_gem "rack", "1.0.1", :to_system => true + + bundle "install" + + should_be_installed "foo 1.0" + should_be_installed "rack 1.0" + end + it "raises if there are multiple gemspecs" do build_lib "foo", "1.0", :path => lib_path("foo") do |s| s.write "bar.gemspec"