module Shoulda::Matchers::ActiveModel

def allow_value(*values)


it { should allow_value('isbn 1 2345 6789 0').for(:isbn) }
it { should_not allow_value('bad').for(:isbn) }
Example:

testing `validates!` and the `:strict => true` validation options.
validation fails rather than adding to the errors collection. Used for
* strict - expects the model to raise an exception when the
the test looks for any errors in errors.on(:attribute).
errors.on(:attribute). Regexp or string. If omitted,
* with_message - value the test expects to find in
Options:

argument list (the remaining arguments are not processed then).
are allowed. Otherwise, the matcher fails at the first bad value in the
multiple values are given the match succeeds only if all given values
Ensures that the attribute can be set to the given value or values. If
def allow_value(*values)
  if values.empty?
    raise ArgumentError, 'need at least one argument'
  else
    AllowValueMatcher.new(*values)
  end
end