Topic: How to delete all objects before testing?
very often I forget to add checks for nil objects in my views, so I'd like to test it as well. I'm very new to testing in Rails, so I'm not sure how I can do this.
I've got some objects already loaded from test/fixtures/model.yml. Should I add Model.delete_all to each test, where I want to test how app behaves when there are no objects? Is there an easy way to remove *all* objects from the database?
BTW. Are there some good guides to testing in Rails, except AWDR book?
Thank you in advance