diff options
author | The Bundler Bot <bot@bundler.io> | 2017-02-08 15:43:35 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2017-02-08 15:43:35 +0000 |
commit | 427f07f77f414f43d693c87c104546af3d9fe984 (patch) | |
tree | 85e015253a40a5293084f57b7e37b10c7c1524ee /spec/install/gemfile | |
parent | c0de8f625f0ae2ed5cc2b26673c875e2900a9829 (diff) | |
parent | d4384e39565b348b394677e2e357f46c601c54fb (diff) | |
download | bundler-427f07f77f414f43d693c87c104546af3d9fe984.tar.gz |
Auto merge of #5391 - bundler:seg-ruby-version-requirement-valid, r=indirect
[RubyVersion] Ensure passed-in versions are valid during init
Closes #5380
Diffstat (limited to 'spec/install/gemfile')
-rw-r--r-- | spec/install/gemfile/ruby_spec.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/install/gemfile/ruby_spec.rb b/spec/install/gemfile/ruby_spec.rb index 3f8957916b..b9d9683758 100644 --- a/spec/install/gemfile/ruby_spec.rb +++ b/spec/install/gemfile/ruby_spec.rb @@ -86,4 +86,24 @@ RSpec.describe "ruby requirement" do expect(the_bundle).to include_gems "rack 1.0.0" expect(locked_ruby_version.versions).to eq(["5100"]) end + + it "allows requirements with trailing whitespace" do + install_gemfile! <<-G + source "file://#{gem_repo1}" + ruby "#{RUBY_VERSION}\\n \t\\n" + gem "rack" + G + + expect(the_bundle).to include_gems "rack 1.0.0" + end + + it "fails gracefully with malformed requirements" do + install_gemfile <<-G + source "file://#{gem_repo1}" + ruby ">= 0", "-.\\0" + gem "rack" + G + + expect(out).to include("There was an error parsing") # i.e. DSL error, not error template + end end |