Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem command options not retained properly on version ding #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions spec/bundler/unit/gemfile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,21 @@ def gem_fixture_create(dir, gems, locks=nil)
File.read('Gemfile').should have_line("gem ' foo ', '>= 1.3.0'")
end
end

it 'should be okay with additional arguments to gem command' do
gem_fixture_create(@tmpdir, {foo: '~> 1.2'}, {foo: '1.2.5'}) do
# Working around the fixture hax
gemfile = <<~_
source 'https://rubygems.org'
gem 'foo', '~> 1.2', require: "foo"
_
File.open('Gemfile', 'w') { |f| f.print gemfile }

s = Gemfile.new(gem_name: 'foo', patched_versions: ['1.3.0'])
s.update
File.read('Gemfile').should have_line("gem 'foo', '~> 1.3', require: \"foo\"")
end
end
end

describe 'Insecure sources' do
Expand Down