summaryrefslogtreecommitdiff
path: root/spec/support/include_strings.rb
blob: 3671c35d1d0f5e41db4cea837874c4f68a9514f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true
require 'rspec/expectations'

RSpec::Matchers.define :include_strings do |expected|
  match do |actual|
    includes_strings = true
    expected.each do |s|
      includes_strings = false unless actual.include?(s.to_s)
    end
    includes_strings
  end
end