2 Matching Annotations
- Mar 2022
- Feb 2021
The assert method is used by all the other assertions. It pushes the second parameter to the list of errors if the first parameter evaluates to false or nil.
Seems like these helper functions could be just as easily used in ActiveRecord models. Therefore, they should be in a separate gem, or at least module, that can be used in both these objects and ActiveRecord objects.
- why create/reinvent a new/different way to do it instead of reusing existing way?
- this is an orthogonal concern; it should be separate from that rather than part of / coupled with that
- too coupled/dependent on
- do one thing and do it well
- helper functions