Skip to content

Commit

Permalink
Merge pull request #12813 from ydah/add-rubocop-rspec_rails
Browse files Browse the repository at this point in the history
Add rubocop-rspec_rails to suggested extensions and extension doc
  • Loading branch information
koic authored Apr 1, 2024
2 parents 23e1142 + acd547b commit 9a533ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* [#12813](https://github.com/rubocop/rubocop/pull/12813): Add rubocop-rspec_rails to suggested extensions and extension doc. ([@ydah][])
3 changes: 2 additions & 1 deletion config/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,14 @@ AllCops:
# included.
SuggestExtensions:
rubocop-rails: [rails]
rubocop-rspec: [rspec, rspec-rails]
rubocop-rspec: [rspec]
rubocop-minitest: [minitest]
rubocop-sequel: [sequel]
rubocop-rake: [rake]
rubocop-graphql: [graphql]
rubocop-capybara: [capybara]
rubocop-factory_bot: [factory_bot, factory_bot_rails]
rubocop-rspec_rails: [rspec-rails]
# Enable/Disable checking the methods extended by Active Support.
ActiveSupportExtensionsEnabled: false

Expand Down
2 changes: 2 additions & 0 deletions docs/modules/ROOT/pages/extensions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Thread-safety analysis
Capybara-specific analysis
* https://github.com/rubocop/rubocop-factory_bot[rubocop-factory_bot] -
factory_bot-specific analysis
* https://github.com/rubocop/rubocop-rspec_rails[rubocop-rspec_rails] -
RSpec Rails-specific analysis

==== Third-party Extensions

Expand Down
8 changes: 6 additions & 2 deletions spec/rubocop/cli/suggest_extensions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@ def find_suggestions
end

it 'shows the suggestion' do
expect { cli.run(['example.rb']) }.to suggest_extensions.to_install('rubocop-rspec')
expect { cli.run(['example.rb']) }.to suggest_extensions.to_install(
'rubocop-rspec', 'rubocop-rspec_rails'
)
end
end

Expand Down Expand Up @@ -326,7 +328,9 @@ def find_suggestions
end

it 'shows the suggestion' do
expect { cli.run(['example.rb']) }.to suggest_extensions.to_install('rubocop-rspec')
expect { cli.run(['example.rb']) }.to suggest_extensions.to_install(
'rubocop-rspec', 'rubocop-rspec_rails'
)
end
end

Expand Down

0 comments on commit 9a533ec

Please sign in to comment.