Skip to content

Conversation

@caseyhelbling
Copy link

NOTE: DO NOT discuss internal CommitChange information in your PR; this PR will be public.
Link back to the issue in the Tix repo when you need to do that.

Per your CR request.

@wwahammy
Copy link
Member

wwahammy commented Jun 18, 2025

@caseyhelbling Nice work here, I'm debugging it some more. This reminds me of something I hadn't mentioned before but I should:

If you have an option on whether to use the entity factory normally associated with a model (:event, :nonprofit, :supporter, etc.) or one titled with the _base suffix (:event_base, :nonprofit_base, supporter_base, etc), you should always use _base version.

Here's why:

When I originally used Factory bot, I didn't understand it and I didn't follow best practices. In particular, I hardcoded things and I didn't follow the principle of "only fill the required attributes and nothing more". As I understood more, I wanted to follow those principles but it was going to be a headache to change the factories that already existed. To work around that, I just created these _base factories. In almost all cases, they're much better to work with for new specs.

@wwahammy wwahammy changed the base branch from supporter_level_goal to turn-off-geocode-by-default-for-event-factory June 18, 2025 20:53
Base automatically changed from turn-off-geocode-by-default-for-event-factory to supporter_level_goal June 21, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants