class RSpec::Rails::Matchers::ActionMailbox::ReceiveInboundEmail
@private
Attributes
Public Class Methods
Source
# File lib/rspec/rails/matchers/action_mailbox.rb, line 19 def initialize(message) super() @inbound_email = create_inbound_email(message) end
Calls superclass method
RSpec::Rails::Matchers::BaseMatcher::new
Public Instance Methods
Source
# File lib/rspec/rails/matchers/action_mailbox.rb, line 41 def failure_message "expected #{describe_inbound_email} to route to #{mailbox}".tap do |msg| if receiver msg << ", but routed to #{receiver} instead" end end end
Source
# File lib/rspec/rails/matchers/action_mailbox.rb, line 49 def failure_message_when_negated "expected #{describe_inbound_email} not to route to #{mailbox}" end
Source
# File lib/rspec/rails/matchers/action_mailbox.rb, line 26 def matches?(mailbox) @mailbox = mailbox @receiver = ApplicationMailbox.router.mailbox_for(inbound_email) @receiver == @mailbox end
Private Instance Methods
Source
# File lib/rspec/rails/matchers/action_mailbox.rb, line 57 def describe_inbound_email "mail to #{inbound_email.mail.to.to_sentence}" end