Test Plugin provides several handy facilities.
Fixtures for Code with No Underlying Model
It can be a bear to test code with no underlying model or with a model that is not contained in your primary database. That's because the fixtures, by default, populate the test database. Enter the brand new command:
no_db_fixtures :foos, :bars
Asserts for Any Predicate
It is more natural to use an assert of the form:
assert_include ['moo', 'goo', 'doo], @foo
-or, more concretely-
assert_include expected_email, email.to
Each of these is automagically created to utilize predicates in the Ruby language or in your own code. First the predicate? form is attempted, then simply predicate without the question mark.
These details are provided for information only. No information here is legal advice and should not be used as such.