Skip to content

FactoryBot linter failing for a model that uses closure_tree #308

Closed
@bijalhopkins

Description

@bijalhopkins

I have a model that I am using closure tree with and have a factory created for it. We have a spec that does FactoryBot.lint FactoryBot.factories, which is now failing because of the error below.

expected no Exception, got #<FactoryBot::InvalidFactoryError: The following factories are invalid:

* display_logic - undefined local variable or method `_ct_reorder_prior_siblings_if_parent_changed' for #<Registries::DisplayLogic:0x00007ffb3bc1c828> (NameError)

This was the last commit where the factory was passing the linter. Any suggestions on how to fix this?

rails (5.2.0)
factory_bot (4.8.2)
factory_bot_rails (4.8.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions