Module: RuboCop::FactoryBot::Language
- Extended by:
- NodePattern::Macros
- Included in:
- Cop::FactoryBot::ConfigurableExplicitOnly, Cop::FactoryBot::CreateList, Cop::FactoryBot::FactoryNameStyle, Cop::FactoryBot::IdSequence, Cop::FactoryBot::SyntaxMethods
- Defined in:
- lib/rubocop/factory_bot/language.rb
Overview
Contains node matchers for common factory_bot DSL.
Constant Summary collapse
- METHODS =
%i[ attributes_for attributes_for_list attributes_for_pair build build_list build_pair build_stubbed build_stubbed_list build_stubbed_pair create create_list create_pair generate generate_list null null_list null_pair ].to_set.freeze
Instance Method Summary collapse
Instance Method Details
#factory_bot?(node) ⇒ Object
30 31 32 |
# File 'lib/rubocop/factory_bot/language.rb', line 30 def_node_matcher :factory_bot?, <<~PATTERN (const {nil? cbase} {:FactoryGirl :FactoryBot}) PATTERN |