Class: RuboCop::Capybara::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Capybara::Plugin
- Defined in:
- lib/rubocop/capybara/plugin.rb
Overview
A plugin that integrates RuboCop Capybara with RuboCop’s plugin system.
Instance Method Summary collapse
-
#about ⇒ Object
:nocov:.
- #rules(_context) ⇒ Object
-
#supported?(context) ⇒ Boolean
:nocov:.
Instance Method Details
#about ⇒ Object
:nocov:
12 13 14 15 16 17 18 19 |
# File 'lib/rubocop/capybara/plugin.rb', line 12 def about LintRoller::About.new( name: 'rubocop-capybara', version: Version::STRING, homepage: 'https://github.com/rubocop/rubocop-capybara', description: 'Code style checking for Capybara test files.' ) end |
#rules(_context) ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/rubocop/capybara/plugin.rb', line 26 def rules(_context) project_root = Pathname.new(__dir__).join('../../..') LintRoller::Rules.new( type: :path, config_format: :rubocop, value: project_root.join('config/default.yml') ) end |
#supported?(context) ⇒ Boolean
:nocov:
22 23 24 |
# File 'lib/rubocop/capybara/plugin.rb', line 22 def supported?(context) context.engine == :rubocop end |