From d64348ab53bb4d29e6db0095d0be75397b0ad339 Mon Sep 17 00:00:00 2001 From: Andre Arko Date: Mon, 11 Jan 2016 00:43:37 -0800 Subject: add spec verifying that #4147 is fixed this test fails when run against the tag v1.11.0, and passes when run against v1.11.2. --- spec/install/gemfile/ruby_spec.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 spec/install/gemfile/ruby_spec.rb diff --git a/spec/install/gemfile/ruby_spec.rb b/spec/install/gemfile/ruby_spec.rb new file mode 100644 index 0000000000..9b35e3819c --- /dev/null +++ b/spec/install/gemfile/ruby_spec.rb @@ -0,0 +1,24 @@ +require "spec_helper" + +describe "ruby requirement" do + # As discovered by https://github.com/bundler/bundler/issues/4147, there is + # no test coverage to ensure that adding a gem is possible with a ruby + # requirement. This test verifies the fix, committed in bfbad5c5. + it "allows adding gems" do + install_gemfile <<-G + source "file://#{gem_repo1}" + ruby "#{RUBY_VERSION}" + gem "rack" + G + + install_gemfile <<-G + source "file://#{gem_repo1}" + ruby "#{RUBY_VERSION}" + gem "rack" + gem "rack-obama" + G + + expect(exitstatus).to eq(0) if exitstatus + should_be_installed "rack-obama 1.0" + end +end -- cgit v1.2.1