summaryrefslogtreecommitdiff
path: root/spec/support/include_strings.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/include_strings.rb')
-rw-r--r--spec/support/include_strings.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/support/include_strings.rb b/spec/support/include_strings.rb
new file mode 100644
index 0000000..bddff1a
--- /dev/null
+++ b/spec/support/include_strings.rb
@@ -0,0 +1,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)
+ end
+ includes_strings
+ end
+end