bingo bob wrote:
I’m just reading it. TDD is a bit much for me initially!
It’s actually a lot easier to write the tests first, because you can’t
forget to write them! Also, the tests serve as documentation of what
you meant the app to do. Adding tests to already written code – as
you’re doing – requires lots of thought about what you meant originally
and where the failure points could be.
One question, trying to understand the stated example…
post = Post.new
What does “!post.save” mean?
If I’ve understood correctly this test is testing that a new post does
By the way, I’d recommend that you try RSpec. I generally find its
syntax and philosophy far more friendly than Rails’ own test framework.
Am I right?