Test for required attributes

/ Published in: Ruby
Save to your folder(s)

A fairly DRY way to test for required attributes of a model. It's sort of an alternative to fixtures. It breaks the one-assertion-per-test rule that some people favor. Drop in your unit test and edit as necessary.

A better (yet not quite perfect) approach:

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.