Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable class names for factories (#6700)
* ☑️ Better allow downstream apps to reuse factories Prior to this commit, a downstream implementation that re-uses a factory cannot change it's inheritance. In my experiments, I am unable to modify a factory's parent via FactoryBot's current implementation. This means that in a Hyku application that has it's own AdminSet, FileSet, and Collection models, I cannot re-use the `:hyrax_admin_set`, `:hyrax_collection`, and `:hyrax_file_set` factories. The problem emerges when I re-use a Hyrax factory that then calls a Hyrax factory (e.g. the permission_template factory can create a `:hyrax_admin_set`). With this commit, I downstream applications can more easily re-use factories. I need the antics of sniffing out ancestry because of Hyrax configurations under test. Namely when we're testing wings the Hyrax.admin_set_model is `"AdminSet"`; which breaks all sorts of things. * ☑️ Remove hyrax/specs/factories In my downstream testing this was creating absolute mayhem with auto-loading. Once I've settled on the pattern, I'll document how to do this. * 💄 endless and ever appeasing of the coppers
- Loading branch information