Sha256: 34bc0c4feba9f0a4bca62be8b3b17e0a3299a6925900dbd298aa23ab86c51320

Contents?: true

Size: 379 Bytes

Versions: 1

Compression:

Stored size: 379 Bytes

Contents

module Mongoid
  module Matchers
    module Document
      class BeTimestamped
        def matches?(klass)
          @klass = klass
          @klass.included_modules.include?(Mongoid::Timestamps)
        end

        def description
          "be timestamped Mongoid document"
        end
      end

      def be_timestamped
        BeTimestamped.new
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mongoid-minitest-0.0.1 lib/matchers/document/be_timestamped.rb