News for hackers. Stuff that matters.
Re:Testing code is simple by rahoulb on Thursday September 26, 2013 @08:49AM (#6450344)
As well has helping with verification, I find unit tests help with design. I write less code, and that code is simpler and with looser coupling when I write tests first.
Re:Testing code is simple by kcorbitt on Thursday September 26, 2013 @10:36AM (#6451017)
This has been my experience as well. And I actually like the rspec style of testing that the author dismisses because it allows you to group tests by functionality covered. This goes a long ways towards making your tests more approachable and maintainable. When I contribute to a Ruby gem with good rspec-style tests it's generally trivial for me to see how to format and where to put my tests covering the new functionality.
Re:Testing code is simple by rahoulb on Friday September 27, 2013 @08:29AM (#6456595)
I agree.

I've always said that RSpec is about documentation, not testing (hence the name - it's a specification for your code).

However, recently, I've been using Minitest-spec; not quite as readable but less magic and it feels faster.

Re:Testing code is simple by njharman on Thursday September 26, 2013 @08:54AM (#6450368)
This is mostly what unittesting is about. Not actual "testing".