Topic: What Should I be Testing?
I've fallen in love with TDD. As a PHP developer it's something that I never really did before. With Rails making it so simple and with the benefits of TDD I've been tring to write more tests and make better use of them as I go.
I find myself writing some tests that seem like they're testing the foundations of rails more than anything.
example = Example.new(:name => "Example")
This seems like a waste of time since I'm not really worried that active record is going to die and somehow mess this up.
On the other hand testing validations seems like it might make sense, but again, do I really need to ensure that Rails is going to pay attention to the validations?
There is something to be said for using tests to ensure that things work as expected, which seems to me like testing specific business logic is the main thing that you should be testing.
ten_dollar_book = Book.find(1)
ten_dollar_book.discount = -15
What are the types of things you're testing in your Rails applications? Should I be worried about writing tests that basically ensure ActiveRecord is working as expected? Is that just good general practice or should I focus more of my testing time on business logic?