class Line::Message::RSpec::Matchers::HaveQuickReply
The quick reply matcher for RSpec to search for quick reply action in the message array.
Public Class Methods
Source
# File lib/line/message/rspec/matchers/have_quick_reply.rb, line 10 def initialize(expected) @expected = Utils.stringify_keys!(expected, deep: true) end
Public Instance Methods
Source
# File lib/line/message/rspec/matchers/have_quick_reply.rb, line 14 def description return "have quick reply action" if @expected.nil? "have quick reply action matching #{@expected}" end
Source
# File lib/line/message/rspec/matchers/have_quick_reply.rb, line 26 def failure_message "expected to find a quick reply message matching #{@expected}" end
Source
# File lib/line/message/rspec/matchers/have_quick_reply.rb, line 20 def matches?(actual) @actual = Utils.stringify_keys!(actual, deep: true) @actual.any? { |message| match_message(message) } end
Also aliased as: ==