2 Matching Annotations
- 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.
- too coupled/dependent on
- this is an orthogonal concern; it should be separate from that rather than part of / coupled with that
- why create/reinvent a new/different way to do it instead of reusing existing way?
- helper functions
- do one thing and do it well