Module: RuboCop::Cop::Vicenzo::RSpec::DescribedMethod
- Included in:
- CompetingSubjects, LetIsMethodResult, SubjectDefinedAsLet, SubjectIsMethodResult
- Defined in:
- lib/rubocop/cop/vicenzo/rspec/mixin/described_method.rb
Overview
Shared helpers for the cops that read an example group naming a method - #instance_method,
.class_method, #method(signature), or the bare method name - and ask what the definitions
under it are built from.
Meant for cops inheriting from RuboCop::Cop::RSpec::Base: example_group? and cop_config
come from there.
Constant Summary collapse
- PREFIXED_METHOD_DESCRIPTION =
#catch,.catch, and the form carrying a signature such as#catch(object:). /\A[#.](?<name>.+?)(?:\(.*\))?\z/- BARE_METHOD_DESCRIPTION =
catch- a description that is nothing but a method name. /\A(?<name>\w+[?!=]?)\z/