Module: Lita::RSpec::Matchers::ChatRouteMatcher

Extended by:
RSpec::Matchers::DSL
Included in:
Handler
Defined in:
lib/lita/rspec/matchers/chat_route_matcher.rb

Overview

RSpec matchers for chat routes.

Since:

  • 4.0.0

Instance Method Summary collapse

Instance Method Details

#route_command(message_body) ⇒ void

This method returns an undefined value.

Sets an expectation that the provided message routes to a command.

Parameters:

  • message_body (String)

    The body of the message.

Since:

  • 4.0.0



42
43
44
# File 'lib/lita/rspec/matchers/chat_route_matcher.rb', line 42

def route_command(message_body)
  route("#{robot.mention_name} #{message_body}")
end