Skip to content
This repository
Browse code

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:
e31a1c7#L1R51
  • Loading branch information...
commit b8d0a414067f08b7a57b11b295034f5b88db9fc9 1 parent 0c54578
Terence Lee authored March 20, 2012

Showing 1 changed file with 126 additions and 0 deletions. Show diff stats Hide diff stats

  1. 126  spec/realworld/edgecases_spec.rb
126  spec/realworld/edgecases_spec.rb
@@ -48,4 +48,130 @@
48 48
     err.should_not include("Could not find rake")
49 49
     err.should be_empty
50 50
   end
  51
+
  52
+  it "checks out git repos when the lockfile is corrupted" do
  53
+    gemfile <<-G
  54
+      source :rubygems
  55
+
  56
+      gem 'activerecord',  :github => 'carlhuda/rails-bundler-test', :branch => 'master'
  57
+      gem 'activesupport', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
  58
+      gem 'actionpack',    :github => 'carlhuda/rails-bundler-test', :branch => 'master'
  59
+    G
  60
+
  61
+    lockfile <<-L
  62
+      GIT
  63
+        remote: git://github.com/carlhuda/rails-bundler-test.git
  64
+        revision: 369e28a87419565f1940815219ea9200474589d4
  65
+        branch: master
  66
+        specs:
  67
+          actionpack (3.2.2)
  68
+            activemodel (= 3.2.2)
  69
+            activesupport (= 3.2.2)
  70
+            builder (~> 3.0.0)
  71
+            erubis (~> 2.7.0)
  72
+            journey (~> 1.0.1)
  73
+            rack (~> 1.4.0)
  74
+            rack-cache (~> 1.2)
  75
+            rack-test (~> 0.6.1)
  76
+            sprockets (~> 2.1.2)
  77
+          activemodel (3.2.2)
  78
+            activesupport (= 3.2.2)
  79
+            builder (~> 3.0.0)
  80
+          activerecord (3.2.2)
  81
+            activemodel (= 3.2.2)
  82
+            activesupport (= 3.2.2)
  83
+            arel (~> 3.0.2)
  84
+            tzinfo (~> 0.3.29)
  85
+          activesupport (3.2.2)
  86
+            i18n (~> 0.6)
  87
+            multi_json (~> 1.0)
  88
+
  89
+      GIT
  90
+        remote: git://github.com/carlhuda/rails-bundler-test.git
  91
+        revision: 369e28a87419565f1940815219ea9200474589d4
  92
+        branch: master
  93
+        specs:
  94
+          actionpack (3.2.2)
  95
+            activemodel (= 3.2.2)
  96
+            activesupport (= 3.2.2)
  97
+            builder (~> 3.0.0)
  98
+            erubis (~> 2.7.0)
  99
+            journey (~> 1.0.1)
  100
+            rack (~> 1.4.0)
  101
+            rack-cache (~> 1.2)
  102
+            rack-test (~> 0.6.1)
  103
+            sprockets (~> 2.1.2)
  104
+          activemodel (3.2.2)
  105
+            activesupport (= 3.2.2)
  106
+            builder (~> 3.0.0)
  107
+          activerecord (3.2.2)
  108
+            activemodel (= 3.2.2)
  109
+            activesupport (= 3.2.2)
  110
+            arel (~> 3.0.2)
  111
+            tzinfo (~> 0.3.29)
  112
+          activesupport (3.2.2)
  113
+            i18n (~> 0.6)
  114
+            multi_json (~> 1.0)
  115
+
  116
+      GIT
  117
+        remote: git://github.com/carlhuda/rails-bundler-test.git
  118
+        revision: 369e28a87419565f1940815219ea9200474589d4
  119
+        branch: master
  120
+        specs:
  121
+          actionpack (3.2.2)
  122
+            activemodel (= 3.2.2)
  123
+            activesupport (= 3.2.2)
  124
+            builder (~> 3.0.0)
  125
+            erubis (~> 2.7.0)
  126
+            journey (~> 1.0.1)
  127
+            rack (~> 1.4.0)
  128
+            rack-cache (~> 1.2)
  129
+            rack-test (~> 0.6.1)
  130
+            sprockets (~> 2.1.2)
  131
+          activemodel (3.2.2)
  132
+            activesupport (= 3.2.2)
  133
+            builder (~> 3.0.0)
  134
+          activerecord (3.2.2)
  135
+            activemodel (= 3.2.2)
  136
+            activesupport (= 3.2.2)
  137
+            arel (~> 3.0.2)
  138
+            tzinfo (~> 0.3.29)
  139
+          activesupport (3.2.2)
  140
+            i18n (~> 0.6)
  141
+            multi_json (~> 1.0)
  142
+
  143
+      GEM
  144
+        remote: http://rubygems.org/
  145
+        specs:
  146
+          arel (3.0.2)
  147
+          builder (3.0.0)
  148
+          erubis (2.7.0)
  149
+          hike (1.2.1)
  150
+          i18n (0.6.0)
  151
+          journey (1.0.3)
  152
+          multi_json (1.1.0)
  153
+          rack (1.4.1)
  154
+          rack-cache (1.2)
  155
+            rack (>= 0.4)
  156
+          rack-test (0.6.1)
  157
+            rack (>= 1.0)
  158
+          sprockets (2.1.2)
  159
+            hike (~> 1.2)
  160
+            rack (~> 1.0)
  161
+            tilt (~> 1.1, != 1.3.0)
  162
+          tilt (1.3.3)
  163
+          tzinfo (0.3.32)
  164
+
  165
+      PLATFORMS
  166
+        ruby
  167
+
  168
+      DEPENDENCIES
  169
+        actionpack!
  170
+        activerecord!
  171
+        activesupport!
  172
+    L
  173
+
  174
+    bundle :install, :exitstatus => true
  175
+    exitstatus.should == 0
  176
+  end
51 177
 end

0 notes on commit b8d0a41

Please sign in to comment.
Something went wrong with that request. Please try again.