debian-mirror-gitlab/spec/support/matchers/email_matcher.rb
2021-04-17 20:07:23 +05:30

20 lines
402 B
Ruby

# 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