Sha256: fe0a3ea9b4e3309e0af115df7f91e6a03f87fdf18966dca7834e099c6118fd96

Contents?: true

Size: 459 Bytes

Versions: 3

Compression:

Stored size: 459 Bytes

Contents

module Mongoid
  module Matchers
    module Validations
      class ValidateConfirmationOfMatcher < HaveValidationMatcher
        include WithMessage

        def initialize(name)
          super(name, :confirmation)
        end

        def with_message(message)
          @expected_message = message
          self
        end
      end

      def validate_confirmation_of(field)
        ValidateConfirmationOfMatcher.new(field)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
mongoid-spec-4.0.1 lib/matchers/validations/confirmation_of.rb
mongoid-rspec-3.0.0 lib/matchers/validations/confirmation_of.rb
mongoid-rspec-2.2.0 lib/matchers/validations/confirmation_of.rb