From f758b80b4818fd98753167366191b203cdab306a Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Fri, 24 Feb 2023 21:29:13 -0600 Subject: Refactoriza el suite de tests --- spec/support/include_strings.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spec/support/include_strings.rb (limited to 'spec/support/include_strings.rb') 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 -- cgit v1.2.3