In other words I wanted to define a constant with the same name via
#class_eval in 2 different classes (nevermind why I was doing this via
#class_eval, just know it was necessary and for a good reason). Of course the
problem is there’s only ever going to be 1 constant named TYPES defined, there
won’t be 2 (1 scoped to User and 1 scoped to Event).

If you enjoyed this post, you might also like:

Want to level up your testing game?
Learn about testing Rails applications and TDD
in our new book
Testing Rails.
The book covers each type of test in depth,
intermediate testing concepts,
and anti-patterns that trip up even intermediate developers.