rubocop-extension-generator
rubocop-extension-generator copied to clipboard
Duplication of gem 'rspec'
The Gemfile generated by bundle gem
may already contain the gem 'rspec'
. (This depends on BUNDLE_GEM__TEST)
In that case, the following error will occur:
[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice with different version requirements.
You specified: rspec (~> 3.0) and rspec (>= 0). Bundler cannot continue.
# from /path/to/Gemfile:13
# -------------------------------------------
# gem "rubocop", "~> 1.21"
> gem 'rspec'
# -------------------------------------------
https://github.com/rubocop/rubocop-extension-generator/blob/eb0bc98d8ac189d48a6c5acb55e487aeab72139e/lib/rubocop/extension/generator/generator.rb#L136-L138
I think the expected behavior is not to add it if gem 'rspec', ...
is already included.
I just noticed that https://github.com/rubocop/rubocop-extension-generator/pull/10 exists.