class Shoulda::ActiveRecord::Matchers::AllowValueMatcher
def matches?(instance)
def matches?(instance) @instance = instance if Symbol === @expected_message @expected_message = default_error_message(@expected_message) end @instance.send("#{@attribute}=", @value) !errors_match? end