Skip to content
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