module Shoulda::ActiveRecord::Assertions

def assert_good_value(object_or_klass, attribute, value, error_message_to_avoid = nil)

assert_good_value(Product, :price, "0")
@product = Product.new(:tangible => false)

assert_good_value(User, :email, "user@example.com")

instead.
the same name as the class (underscored), that object will be used
instantiated before the assertion. If an instance variable exists with
If a class is passed as the first argument, a new object will be

assert_good_value(User.new, :ssn, "123456789", /length/)
assert_good_value(User.new, :email, "user@example.com")

contained within the list of errors for that attribute.
value by making sure the error_message_to_avoid is not
Asserts that an Active Record model validates with the passed
def assert_good_value(object_or_klass, attribute, value, error_message_to_avoid = nil)
  object = get_instance_of(object_or_klass)
  matcher = allow_value(value).
              for(attribute).
              with_message(error_message_to_avoid)
  assert_accepts(matcher, object)
end