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..
> 
> 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.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
> 
> Am I right?

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to