summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2012-03-20 17:21:41 -0700
committerTerence Lee <hone02@gmail.com>2012-03-20 17:24:58 -0700
commitb8d0a414067f08b7a57b11b295034f5b88db9fc9 (patch)
treebf86540b9f87407bab1940c55217801a0e805f68
parent0c545787c4e1341dffcbba96f7d1c92d394adb18 (diff)
downloadbundler-b8d0a414067f08b7a57b11b295034f5b88db9fc9.tar.gz
Test case for bundle install not checking out git
During the 1.1 pre/RC releases, there were duplicate GIT source sections generated in the `Gemfile.lock`. These would confuse bundler and the wrong source would get attached to the spec. This test case breaks if we don't fix this here: https://github.com/carlhuda/bundler/commit/e31a1c7b24d3dfbce7ed39b6a723dd20f7d08c95#L1R51
-rw-r--r--spec/realworld/edgecases_spec.rb126
1 files changed, 126 insertions, 0 deletions
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index 6a2ab67935..7ae37f570e 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -48,4 +48,130 @@ describe "real world edgecases", :realworld => true do
err.should_not include("Could not find rake")
err.should be_empty
end
+
+ it "checks out git repos when the lockfile is corrupted" do
+ gemfile <<-G
+ source :rubygems
+
+ gem 'activerecord', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
+ gem 'activesupport', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
+ gem 'actionpack', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
+ G
+
+ lockfile <<-L
+ GIT
+ remote: git://github.com/carlhuda/rails-bundler-test.git
+ revision: 369e28a87419565f1940815219ea9200474589d4
+ branch: master
+ specs:
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+
+ GIT
+ remote: git://github.com/carlhuda/rails-bundler-test.git
+ revision: 369e28a87419565f1940815219ea9200474589d4
+ branch: master
+ specs:
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+
+ GIT
+ remote: git://github.com/carlhuda/rails-bundler-test.git
+ revision: 369e28a87419565f1940815219ea9200474589d4
+ branch: master
+ specs:
+ actionpack (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ erubis (~> 2.7.0)
+ journey (~> 1.0.1)
+ rack (~> 1.4.0)
+ rack-cache (~> 1.2)
+ rack-test (~> 0.6.1)
+ sprockets (~> 2.1.2)
+ activemodel (3.2.2)
+ activesupport (= 3.2.2)
+ builder (~> 3.0.0)
+ activerecord (3.2.2)
+ activemodel (= 3.2.2)
+ activesupport (= 3.2.2)
+ arel (~> 3.0.2)
+ tzinfo (~> 0.3.29)
+ activesupport (3.2.2)
+ i18n (~> 0.6)
+ multi_json (~> 1.0)
+
+ GEM
+ remote: http://rubygems.org/
+ specs:
+ arel (3.0.2)
+ builder (3.0.0)
+ erubis (2.7.0)
+ hike (1.2.1)
+ i18n (0.6.0)
+ journey (1.0.3)
+ multi_json (1.1.0)
+ rack (1.4.1)
+ rack-cache (1.2)
+ rack (>= 0.4)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ sprockets (2.1.2)
+ hike (~> 1.2)
+ rack (~> 1.0)
+ tilt (~> 1.1, != 1.3.0)
+ tilt (1.3.3)
+ tzinfo (0.3.32)
+
+ PLATFORMS
+ ruby
+
+ DEPENDENCIES
+ actionpack!
+ activerecord!
+ activesupport!
+ L
+
+ bundle :install, :exitstatus => true
+ exitstatus.should == 0
+ end
end