Sha256: 3fd99de72fa5e9cf28aca0c16b625be5dd417c065aac54d91b5013abb8b59cce
Contents?: true
Size: 561 Bytes
Versions: 72
Compression:
Stored size: 561 Bytes
Contents
# frozen_string_literal: true module Mail module Matchers def any_attachment AnyAttachmentMatcher.new end def an_attachment_with_filename(filename) AttachmentFilenameMatcher.new(filename) end class AnyAttachmentMatcher def ===(other) other.attachment? end end class AttachmentFilenameMatcher attr_reader :filename def initialize(filename) @filename = filename end def ===(other) other.attachment? && other.filename == filename end end end end
Version data entries
72 entries across 56 versions & 13 rubygems