Sha256: 99a5b00bd0fbc7466bcde66ef4617c8986de6509b7174b7f2ae10c36b595754b

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

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

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

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mongoid-rspec-4.2.0 lib/matchers/validations/associated.rb
mongoid-rspec-4.1.0 lib/matchers/validations/associated.rb
mongoid-rspec-4.0.1 lib/matchers/validations/associated.rb
mongoid-rspec-4.0.0 lib/matchers/validations/associated.rb