module Shoulda::ActiveRecord::Matchers
def allow_value(value)
it { should allow_value("isbn 1 2345 6789 0").for(:isbn) }
it { should_not allow_value('bad').for(:isbn) }
Example:
translation for :invalid.
errors.on(:attribute). Regexp or string. Defaults to the
* with_message - value the test expects to find in
Options:
Ensures that the attribute can be set to the given value.
def allow_value(value) AllowValueMatcher.new(value) end