diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-06-05 19:27:45 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-06-05 19:27:45 -0500 |
commit | aca91b66ed0c1e7644d35202c5930ff3475a1fff (patch) | |
tree | df709859a67ed17aaef8211cae30ba523f56e610 /spec/install/gems | |
parent | 1c48ad2d1b77e470d1127c6494c68fdf1b129031 (diff) | |
download | bundler-aca91b66ed0c1e7644d35202c5930ff3475a1fff.tar.gz |
[Installer] Fail fast when required_ruby(gems)?_version doesn't matchseg-ruby-rubygems-version-fail-fast
Diffstat (limited to 'spec/install/gems')
-rw-r--r-- | spec/install/gems/resolving_spec.rb | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/spec/install/gems/resolving_spec.rb b/spec/install/gems/resolving_spec.rb index 49d160063d..74acf9a918 100644 --- a/spec/install/gems/resolving_spec.rb +++ b/spec/install/gems/resolving_spec.rb @@ -105,20 +105,37 @@ describe "bundle install with gem sources" do describe "when some gems require a different version of ruby" do it "does not try to install those gems" do - pending "waiting for a rubygems index that includes ruby version" - update_repo gem_repo1 do build_gem "require_ruby" do |s| s.required_ruby_version = "> 9000" end end - install_gemfile <<-G + install_gemfile <<-G, :artifice => "compact_index" source "file://#{gem_repo1}" gem 'require_ruby' G expect(out).to_not include("Gem::InstallError: require_ruby requires Ruby version > 9000") + expect(out).to include("require_ruby-1.0 requires ruby version > 9000, which is incompatible with the current version, #{Bundler::RubyVersion.system}") + end + end + + describe "when some gems require a different version of rubygems" do + it "does not try to install those gems" do + update_repo gem_repo1 do + build_gem "require_rubygems" do |s| + s.required_rubygems_version = "> 9000" + end + end + + install_gemfile <<-G, :artifice => "compact_index" + source "file://#{gem_repo1}" + gem 'require_rubygems' + G + + expect(out).to_not include("Gem::InstallError: require_rubygems requires RubyGems version > 9000") + expect(out).to include("require_rubygems-1.0 requires rubygems version > 9000, which is incompatible with the current version, #{Gem::VERSION}") end end end |