

Generating specs based on the behaviour of your Rails application - ndea
https://www.airpair.com/rspec/posts/gert

======
ndea
The goal is to generate regression tests which capture the behaviour of your
rails application. Consider regression specs which capture your routes and
give you feedback about non reachable routes. A further example where
generated regression specs are useful are for inconsistent validations.
Consider following validation:

validates :attribute, presence: true, allow_blank: true

A simple spec like:

it {is_expected.to validate_presence_of :attribute} would fail and give you
feedback as a developer that your validation is invalid.

