lib/remarkable_mongomapper/base.rb in yeastymobs-remarkable_mongomapper-0.1.0 vs lib/remarkable_mongomapper/base.rb in yeastymobs-remarkable_mongomapper-0.1.1
- old
+ new
@@ -102,11 +102,10 @@
def assert_good_value(model, attribute, value, error_message_to_avoid=//) # :nodoc:
model.send("#{attribute}=", value)
return true if model.valid?
- # FIXME
error_message_to_avoid = error_message_from_model(model, attribute, error_message_to_avoid)
assert_does_not_contain(model.errors.on(attribute), error_message_to_avoid)
end
# Asserts that an MongoMapper model invalidates the passed
@@ -129,10 +128,9 @@
def assert_bad_value(model, attribute, value, error_message_to_expect=:invalid) #:nodoc:
model.send("#{attribute}=", value)
return false if model.valid? || model.errors.on(attribute).blank?
- # FIXME
error_message_to_expect = error_message_from_model(model, attribute, error_message_to_expect)
assert_contains(model.errors.on(attribute), error_message_to_expect)
end
# Return the error message to be checked. If the message is not a Symbol
\ No newline at end of file