Method: FactoryBot.lint
- Defined in:
- lib/factory_bot.rb
.lint(*args) ⇒ Object
Look for errors in factories and (optionally) their traits. Parameters: factories - which factories to lint; omit for all factories options:
traits: true - to lint traits as well as factories
strategy: :create - to specify the strategy for linting
verbose: true - to include full backtraces for each linting error
67 68 69 70 71 |
# File 'lib/factory_bot.rb', line 67 def self.lint(*args) = args. factories_to_lint = args[0] || FactoryBot.factories Linter.new(factories_to_lint, **).lint! end |