-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Expose files to support testing Cops using RSpec #3179
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I have a Rubocop extension and putting Rubocop in a git submodule to make the specs work was definely the suckiest part. Thanks @tjwp |
@tjwp Awesome, thanks for tackling this! |
I'm fine with this change. Just rebase this branch on top of the current |
Rebased. Thanks! |
You'll have to do this again. :-( |
The exposed files can be loaded from spec_helper using: require 'rubocop/rspec/support'
@bbatsov No problem. Rebased again. |
bquorning
added a commit
to bquorning/rubocop-rspec
that referenced
this pull request
Jun 28, 2016
In RuboCop v0.41.0, spec helpers are released as part of the gem. This means that installing all of the RuboCop source as a git submodule, and jumping through hoops to require the correct files, is no longer needed. See rubocop/rubocop#3179
Neodelf
pushed a commit
to Neodelf/rubocop
that referenced
this pull request
Oct 15, 2016
The exposed files can be loaded from spec_helper using: require 'rubocop/rspec/support'
pocke
added a commit
to pocke/rubocop
that referenced
this pull request
Apr 1, 2018
This file has been moved to `lib/rubocop/rspec/cop_helper.rb`. rubocop#3179 However, it still exists in the gemspec `files` configuration. So this change just removes it from the gemspec.
bbatsov
pushed a commit
that referenced
this pull request
Apr 1, 2018
This file has been moved to `lib/rubocop/rspec/cop_helper.rb`. #3179 However, it still exists in the gemspec `files` configuration. So this change just removes it from the gemspec.
highb
pushed a commit
to highb/rubocop-i18n
that referenced
this pull request
Aug 28, 2019
Prior to this commit we copied `cop_helper.rb` over from the main Rubocop project so that we could re-use it in our specs. This commit adds the new `rubocop/rspec/support` added in rubocop/rubocop#3179 and then removes the copied `cop_helper.rb`, as it is no longer needed.
highb
pushed a commit
to highb/rubocop-i18n
that referenced
this pull request
Aug 28, 2019
Prior to this commit we copied `cop_helper.rb` over from the main Rubocop project so that we could re-use it in our specs. This commit adds the new `rubocop/rspec/support` added in rubocop/rubocop#3179 and then removes the copied `cop_helper.rb`, as it is no longer needed.
highb
pushed a commit
to highb/rubocop-i18n
that referenced
this pull request
Aug 28, 2019
Prior to this commit we copied `cop_helper.rb` over from the main Rubocop project so that we could re-use it in our specs. This commit adds the new `rubocop/rspec/support` added in rubocop/rubocop#3179 and then removes the copied `cop_helper.rb`, as it is no longer needed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made a guess at the files that would be useful to expose.
I've verified that this removes the need for a clone of rubocop to run tests for rubocop-rspec.
The exposed files can be loaded from spec_helper using:
Supporting files were copied unmodified, except for module + class level comments added to
cop_helper.rb
to fix RuboCop offenses.Fixes #3176.
master
(if not - rebase it)and description in grammatically correct, complete sentences.