Sha256: 6e4d84cb559002c87b6ead00c24170714a08ee2e16cbbec6b9572eac0d853549

Contents?: true

Size: 308 Bytes

Versions: 1

Compression:

Stored size: 308 Bytes

Contents

module MiniTest
  module Matchers
    module ActiveModel
      # Ensures that the model is not valid if the given attribute is not present.
      #
      #   it { must validate_presence_of(:name) }
      def validate_presence_of attr
        ValidationMatcher.new attr, :presence
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minitest-activemodel-0.0.1 lib/minitest-activemodel/matchers/validate_presence_matcher.rb