Hacker News new | ask | show | jobs
by richardjordan 4843 days ago
Fundamentally disagree with much of this article. Not just what _that_ guy said: https://news.ycombinator.com/item?id=5418460

When I learned Rails a few years ago, I was learning programming from scratch apart from some very early fumblings in BASIC and FORTRAN 20 years ago now. I was completely unfamiliar with the idea of testing. I had to learn it from the ground up. RSpec wasn't just more understandable it was, and remains, better documented. It's not just the official documentation. It's that there are tons of examples of how to test different use cases, what one should test, best practices.

Learning to test isn't just learning literally what a few methods do. It's understanding how to use those in myriad mix and match situations in order to provide good test coverage.

RSpec is easier to read before the test, it produces beautiful output that is readable and expressive, when you write good tests and test the right things.

After trying to struggle with Test::Unit and writing uncovered code for long stretches because I couldn't understand what to do, and then discovering RSpec, reading great blog posts, write-ups and documentation on it and finding comfort in RED-GREEN-REFACTOR I would only recommend RSpec for someone starting from scratch, as I did.

1 comments

Oh... and I cannot recommend this resource highly enough.

As RSpec documentation goes this set of slides open in a window will help you tremendously:

http://kerryb.github.com/iprug-rspec-presentation/#1

It uses simple example and hits all the major points well.