lib/deimos/test_helpers.rb in deimos-ruby-1.19.4 vs lib/deimos/test_helpers.rb in deimos-ruby-1.19.5

- old
+ new

@@ -141,10 +141,10 @@ end match do |topic| Deimos::Backends::Test.sent_messages.any? do |m| hash_matcher = RSpec::Matchers::BuiltIn::Match.new(message) hash_matcher.send(:match, - message.to_h, + message&.respond_to?(:to_h) ? message.to_h : message, m[:payload]&.with_indifferent_access) && topic == m[:topic] && (key.present? ? key == m[:key] : true) && (partition_key.present? ? partition_key == m[:partition_key] : true) end