Besides the fact that Rails incorporates the database layer into the unit tests (which then is strictly not a unit test), what if I test for model interdependencies, e.g. check if has_many
/belongs_to
with :dependent => :destroy
really destroys the associated items or items from join models to not leave orphans around?
Should such a test maybe better be placed in the function or integration tests?
Or asked another way: Is there a guide with examples which kind of tests should go where and why? I didn't find anything really useful.