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..
def test_should_not_save_post_without_title
post = Post.new
assert !post.save
end
What does "!post.save" mean?
If I've understood correctly this test is testing that a new post does
NOT save?
Yes.
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.