summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-06-22 17:36:20 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-06-23 13:36:34 -0500
commitab5ee1358d96556806b0b67453ed0b98d027be44 (patch)
treedccd1a0adc4e9bf6de932a23675234cc27a00681
parentd3ac938107ed62d4d8944e67411f45d3e82c7ec2 (diff)
downloadbundler-ab5ee1358d96556806b0b67453ed0b98d027be44.tar.gz
Improve realworld specs on 2.0
-rw-r--r--spec/realworld/edgecases_spec.rb19
-rw-r--r--spec/realworld/mirror_probe_spec.rb7
-rw-r--r--spec/realworld/parallel_spec.rb2
3 files changed, 13 insertions, 15 deletions
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index e91e1b1928..fbf885778a 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -79,7 +79,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
gem "gxapi_rails", "< 0.1.0" # 0.1.0 was released way after the test was written
gem 'rack-cache', '1.2.0' # last version that works on Ruby 1.9
G
- bundle :lock
+ bundle! :lock
expect(lockfile).to include("gxapi_rails (0.0.6)")
end
@@ -92,7 +92,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
gem "activerecord", "~> 3.0"
gem "builder", "~> 2.1.2"
G
- bundle :lock
+ bundle! :lock
expect(lockfile).to include(rubygems_version("i18n", "~> 0.6.0"))
expect(lockfile).to include(rubygems_version("activesupport", "~> 3.0"))
end
@@ -223,9 +223,6 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
DEPENDENCIES
paperclip (~> 5.1.0)
rails (~> 4.2.7.1)
-
- BUNDLED WITH
- 1.13.1
L
bundle! "lock --update paperclip"
@@ -250,6 +247,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
it "checks out git repos when the lockfile is corrupted" do
gemfile <<-G
source "https://rubygems.org"
+ git_source(:github) {|repo| "https://github.com/\#{repo}.git" }
gem 'activerecord', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
gem 'activesupport', :github => 'carlhuda/rails-bundler-test', :branch => 'master'
@@ -258,7 +256,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
lockfile <<-L
GIT
- remote: git://github.com/carlhuda/rails-bundler-test.git
+ remote: https://github.com/carlhuda/rails-bundler-test.git
revision: 369e28a87419565f1940815219ea9200474589d4
branch: master
specs:
@@ -285,7 +283,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
multi_json (~> 1.0)
GIT
- remote: git://github.com/carlhuda/rails-bundler-test.git
+ remote: https://github.com/carlhuda/rails-bundler-test.git
revision: 369e28a87419565f1940815219ea9200474589d4
branch: master
specs:
@@ -312,7 +310,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
multi_json (~> 1.0)
GIT
- remote: git://github.com/carlhuda/rails-bundler-test.git
+ remote: https://github.com/carlhuda/rails-bundler-test.git
revision: 369e28a87419565f1940815219ea9200474589d4
branch: master
specs:
@@ -369,9 +367,8 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
activesupport!
L
- bundle :lock
- expect(err).to eq("")
- expect(exitstatus).to eq(0) if exitstatus
+ bundle! :lock
+ expect(last_command.stderr).to lack_errors
end
it "outputs a helpful error message when gems have invalid gemspecs" do
diff --git a/spec/realworld/mirror_probe_spec.rb b/spec/realworld/mirror_probe_spec.rb
index 9ca726f781..559b7c9ccb 100644
--- a/spec/realworld/mirror_probe_spec.rb
+++ b/spec/realworld/mirror_probe_spec.rb
@@ -87,12 +87,13 @@ RSpec.describe "fetching dependencies with a not available mirror", :realworld =
bundle :install, :artifice => nil
- expect(out).to eq "Fetching source index from #{mirror}/
-
+ expect(last_command.stdout).to include "Fetching source index from #{mirror}/"
+ expect(last_command.bundler_err).to include <<-EOS.strip
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from #{mirror}/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from #{mirror}/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from #{mirror}/
-Could not fetch specs from #{mirror}/"
+Could not fetch specs from #{mirror}/
+ EOS
end
end
diff --git a/spec/realworld/parallel_spec.rb b/spec/realworld/parallel_spec.rb
index b8233206e8..2f5bc9fbaf 100644
--- a/spec/realworld/parallel_spec.rb
+++ b/spec/realworld/parallel_spec.rb
@@ -41,7 +41,7 @@ RSpec.describe "parallel", :realworld => true, :sometimes => true do
gem 'i18n', '~> 0.6.0' # Because 0.7+ requires Ruby 1.9.3+
G
- bundle :update, :jobs => 4, :env => { "DEBUG" => "1" }
+ bundle :update, :jobs => 4, :env => { "DEBUG" => "1" }, :all => bundle_update_requires_all?
if Bundler.rubygems.provides?(">= 2.1.0")
expect(out).to match(/[1-3]: /)