This is probably not a good enough point to avoid testing it. The method is still part of something complex and the tests help ensure the acceptability of the code as a whole.
However, yes it is implicitly tested most of the time. If you hold that pattern to be true throughout the app, than you probably don't need to test it. But that hardly seems like a universal truth. I could think of times you'd just call Object.new, perhaps to pass into a form_for.
It seems like part of the reason we typically don't test private methods is that it's sort of inconvenient and perhaps messy to do so. And for that reason, we can settle on testing them implicitly. Testing Object.new seems a lot more straightforward.
We do not test Object.new but in writing this, I feel like we should. But I'd love to hear my points debated or anyone else's thoughts on the issue.
I work directly with other developers, UX professionals, Product Owners and Sysadmins to deliver the best experience to my client in the most efficient way.
This is probably not a good enough point to avoid testing it. The method is still part of something complex and the tests help ensure the acceptability of the code as a whole.
However, yes it is implicitly tested most of the time. If you hold that pattern to be true throughout the app, than you probably don't need to test it. But that hardly seems like a universal truth. I could think of times you'd just call
Object.new
, perhaps to pass into aform_for
.It seems like part of the reason we typically don't test private methods is that it's sort of inconvenient and perhaps messy to do so. And for that reason, we can settle on testing them implicitly. Testing
Object.new
seems a lot more straightforward.We do not test
Object.new
but in writing this, I feel like we should. But I'd love to hear my points debated or anyone else's thoughts on the issue.Those are the points I trust in. Even if it is implicitly tested, it still is a public method.