module Shoulda::Matchers::ActiveModel
def ensure_exclusion_of(attr)
it { should ensure_exclusion_of(:age).in_range(30..60) }
Example:
translation for :exclusion.
errors.on(:attribute). Regexp or string. Defaults to the
* with_message - value the test expects to find in
* in_range - the range of not allowed values for this attribute
* in_array - the array of not allowed values for this attribute
Options:
Ensure that the attribute's value is not in the range specified
def ensure_exclusion_of(attr) EnsureExclusionOfMatcher.new(attr) end