Class: FactoryGirl::Linter
- Inherits:
-
Object
- Object
- FactoryGirl::Linter
- Defined in:
- lib/factory_girl/linter.rb
Defined Under Namespace
Classes: FactoryError, FactoryTraitError
Instance Method Summary collapse
-
#initialize(factories, linting_strategy, factory_strategy = :create) ⇒ Linter
constructor
A new instance of Linter.
- #lint! ⇒ Object
Constructor Details
#initialize(factories, linting_strategy, factory_strategy = :create) ⇒ Linter
Returns a new instance of Linter.
4 5 6 7 8 9 |
# File 'lib/factory_girl/linter.rb', line 4 def initialize(factories, linting_strategy, factory_strategy = :create) @factories_to_lint = factories @linting_method = "lint_#{linting_strategy}" @factory_strategy = factory_strategy @invalid_factories = calculate_invalid_factories end |
Instance Method Details
#lint! ⇒ Object
11 12 13 14 15 |
# File 'lib/factory_girl/linter.rb', line 11 def lint! if invalid_factories.any? raise InvalidFactoryError, end end |