thoughtbot/shoulda-matchers — pull request #499 by mcmire (2014-04-18 04:38:01+00:00)
Title: Rewrite tests for ensure_inclusion_of

ensure_inclusion_of is pretty complex. Not only does it support two ways
of specifying valid values (in_array, in_range), but it also supports
multiple column types (string, integer, float, decimal, boolean).

When it comes to handling numbers and strings, ensure_inclusion_of has
very similar logic, and we can test these cases similarly.

We also do not have tests for handling regular Ruby attributes as
opposed to database columns (validates_inclusion_of works with both).
Those tests will be added in a future commit, this commit lays the
groundwork for that.