class Shoulda::Matchers::ActiveModel::OnlyIntegerMatcher
:nodoc:
:nodoc:
def allowed_types
def allowed_types 'integer' end
def failure_message_for_should
def failure_message_for_should @disallow_value_matcher.failure_message_for_should end
def initialize(attribute)
def initialize(attribute) @attribute = attribute @disallow_value_matcher = DisallowValueMatcher.new(NON_INTEGER_VALUE). for(attribute). with_message(:not_an_integer) end
def matches?(subject)
def matches?(subject) @disallow_value_matcher.matches?(subject) end
def with_message(message)
def with_message(message) @disallow_value_matcher.with_message(message) self end