Hacker News new | ask | show | jobs
by lukes386 4516 days ago
Interesting post, but that much scaffolding around the tests is a bit of a red flag to me.

I personally try to move as much logic as possible into easily testable, independent methods. This leaves things like Rake tasks as very small, "obviously correct" shells around the actual logic.

I highly recommend checking out the talk Boundaries by Gary Bernhardt[0], which explains this idea far better than I can.

[0]: https://www.destroyallsoftware.com/talks/boundaries

1 comments

Thank you, lukes386, for your comment.

I'm new to Ruby / Rails and using RSpec in general, so I really appreciate any resources people pass along. I'll be sure to check out that talk and may refactor my tests accordingly.