gitlab-org--gitlab-foss/spec/support/matchers/email_matchers.rb
Rémy Coutable 517598ba10 Add a new have_html_escaped_body_text that match an HTML-escaped text
This solves transient failures when a text contains HTML-escapable
characters such as `'`.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-03-17 12:20:54 +01:00

5 lines
166 B
Ruby

RSpec::Matchers.define :have_html_escaped_body_text do |expected|
match do |actual|
expect(actual).to have_body_text(ERB::Util.html_escape(expected))
end
end