summaryrefslogtreecommitdiff
path: root/spec/support/matchers/email_matchers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/matchers/email_matchers.rb')
-rw-r--r--spec/support/matchers/email_matchers.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/matchers/email_matchers.rb b/spec/support/matchers/email_matchers.rb
new file mode 100644
index 00000000000..d9d59ec12ec
--- /dev/null
+++ b/spec/support/matchers/email_matchers.rb
@@ -0,0 +1,5 @@
+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