summaryrefslogtreecommitdiff
path: root/spec/bundler/realworld/edgecases_spec.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-14 06:01:35 +0000
commit68ddd4d300e9a88737c4f37af74e1a0312949b2f (patch)
tree787e1e83d76934ce039eb336995a8d5bb53a89e6 /spec/bundler/realworld/edgecases_spec.rb
parentd636809c057432e8d42abe30c6c6785eb0721d77 (diff)
Merge Bundler 2.1.0.pre.1 as developed version from upstream.
https://github.com/bundler/bundler/commit/a53709556b95a914e874b22ed2116a46b0528852 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/bundler/realworld/edgecases_spec.rb')
-rw-r--r--spec/bundler/realworld/edgecases_spec.rb61
1 files changed, 12 insertions, 49 deletions
diff --git a/spec/bundler/realworld/edgecases_spec.rb b/spec/bundler/realworld/edgecases_spec.rb
index 1db5c0f9d6..a3662c91e7 100644
--- a/spec/bundler/realworld/edgecases_spec.rb
+++ b/spec/bundler/realworld/edgecases_spec.rb
@@ -19,63 +19,25 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
RUBY
end
- # there is no rbx-relative-require gem that will install on 1.9
- it "ignores extra gems with bad platforms", :ruby => "~> 1.8.7" do
- gemfile <<-G
- source "https://rubygems.org"
- gem "linecache", "0.46"
- G
- bundle :lock
- expect(err).to lack_errors
- expect(exitstatus).to eq(0) if exitstatus
- end
-
- # https://github.com/bundler/bundler/issues/1202
- it "bundle cache works with rubygems 1.3.7 and pre gems",
- :ruby => "~> 1.8.7", :rubygems => "~> 1.3.7" do
- install_gemfile <<-G
- source "https://rubygems.org"
- gem "rack", "1.3.0.beta2"
- gem "will_paginate", "3.0.pre2"
- G
- bundle :cache
- expect(out).not_to include("Removing outdated .gem files from vendor/cache")
- end
-
- # https://github.com/bundler/bundler/issues/1486
- # this is a hash collision that only manifests on 1.8.7
- it "finds the correct child versions", :ruby => "~> 1.8.7" do
- gemfile <<-G
- source "https://rubygems.org"
-
- gem 'i18n', '~> 0.6.0'
- gem 'activesupport', '~> 3.0.5'
- gem 'activerecord', '~> 3.0.5'
- gem 'builder', '~> 2.1.2'
- G
- bundle :lock
- expect(lockfile).to include("activemodel (3.0.5)")
- end
-
- it "resolves dependencies correctly", :ruby => "<= 1.9.3" do
+ it "resolves dependencies correctly" do
gemfile <<-G
source "https://rubygems.org"
- gem 'rails', '~> 3.0'
+ gem 'rails', '~> 5.0'
gem 'capybara', '~> 2.2.0'
gem 'rack-cache', '1.2.0' # last version that works on Ruby 1.9
G
bundle! :lock
- expect(lockfile).to include(rubygems_version("rails", "~> 3.0"))
+ expect(lockfile).to include(rubygems_version("rails", "~> 5.0"))
expect(lockfile).to include("capybara (2.2.1)")
end
- it "installs the latest version of gxapi_rails", :ruby => "<= 1.9.3" do
+ it "installs the latest version of gxapi_rails" do
gemfile <<-G
source "https://rubygems.org"
gem "sass-rails"
- gem "rails", "~> 3"
+ gem "rails", "~> 5"
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
@@ -97,7 +59,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
expect(lockfile).to include(rubygems_version("activesupport", "~> 3.0"))
end
- it "is able to update a top-level dependency when there is a conflict on a shared transitive child", :ruby => "2.1" do
+ it "is able to update a top-level dependency when there is a conflict on a shared transitive child" do
# from https://github.com/bundler/bundler/issues/5031
gemfile <<-G
@@ -239,9 +201,10 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
gem 'rack', '1.0.1'
G
- bundle! :install, forgotten_command_line_options(:path => "vendor/bundle")
+ bundle "config set --local path vendor/bundle"
+ bundle! :install
expect(err).not_to include("Could not find rake")
- expect(err).to lack_errors
+ expect(last_command.stderr).to be_empty
end
it "checks out git repos when the lockfile is corrupted" do
@@ -368,7 +331,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
L
bundle! :lock
- expect(last_command.stderr).to lack_errors
+ expect(last_command.stderr).to be_empty
end
it "outputs a helpful error message when gems have invalid gemspecs" do
@@ -376,7 +339,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do
source 'https://rubygems.org'
gem "resque-scheduler", "2.2.0"
G
- expect(out).to include("You have one or more invalid gemspecs that need to be fixed.")
- expect(out).to include("resque-scheduler 2.2.0 has an invalid gemspec")
+ expect(err).to include("You have one or more invalid gemspecs that need to be fixed.")
+ expect(err).to include("resque-scheduler 2.2.0 has an invalid gemspec")
end
end