Class: RSpec::MailMatcher::AddressMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/mail_matcher/address_matcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(expected) ⇒ AddressMatcher

Returns a new instance of AddressMatcher.



3
4
5
# File 'lib/rspec/mail_matcher/address_matcher.rb', line 3

def initialize(expected)
  @expected = expected
end

Instance Method Details

#matches?(mail) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
# File 'lib/rspec/mail_matcher/address_matcher.rb', line 7

def matches?(mail)
  @mail = mail
  mails.include?(@expected)
end