Sha256: 54698f1d21f6140e24ecda728e8137880091aaba84f46d78a0c7dd82e335a210

Contents?: true

Size: 434 Bytes

Versions: 9

Compression:

Stored size: 434 Bytes

Contents

module Mongoid
  module Matchers
    module Validations
      class ValidateAssociated < HaveValidationMatcher
        def initialize(association_name)
          super(association_name, :associated)
        end

        def description
          "validate associated #{@field.inspect}"
        end
      end

      def validate_associated(association_name)
        ValidateAssociated.new(association_name)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
mongoid-minitest-0.1.5 lib/matchers/validations/associated.rb
mongoid-minitest-0.1.4 lib/matchers/validations/associated.rb
mongoid-minitest-0.1.3 lib/matchers/validations/associated.rb
mongoid-minitest-0.1.3.pre lib/matchers/validations/associated.rb
mongoid-minitest-0.1.2 lib/matchers/validations/associated.rb
mongoid-minitest-0.1.1 lib/matchers/validations/associated.rb
mongoid-minitest-0.1.0 lib/matchers/validations/associated.rb
mongoid-minitest-0.0.3.1 lib/matchers/validations/associated.rb
mongoid-minitest-0.0.3 lib/matchers/validations/associated.rb