otwarchive-symphonyarchive/spec/support/matchers/have_html_part_content.rb

15 lines
368 B
Ruby
Raw Permalink Normal View History

2026-03-11 22:22:11 +00:00
RSpec::Matchers.define :have_html_part_content do |expected_content|
match do |email|
expect(email.html_part.decoded).to include(expected_content)
end
failure_message do |email|
"expected to find text \"#{expected_content}\" in
#{email.html_part.decoded}"
end
description do
"have text \"#{expected_content}\" in HTML email part"
end
end