debian-mirror-gitlab/spec/support/matchers/email_matcher.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
402 B
Ruby
Raw Normal View History

2021-04-17 20:07:23 +05:30
# frozen_string_literal: true
RSpec::Matchers.define :have_text_part_content do |expected|
match do |actual|
@actual = actual.text_part.body.to_s
expect(@actual).to include(expected)
end
diffable
end
RSpec::Matchers.define :have_html_part_content do |expected|
match do |actual|
@actual = actual.html_part.body.to_s
expect(@actual).to include(expected)
end
diffable
end