diff options
author | HombreLaser <sebastian-440@live.com> | 2023-02-24 21:29:13 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-02-24 21:29:13 -0600 |
commit | f758b80b4818fd98753167366191b203cdab306a (patch) | |
tree | 112dc9b620aeefc654763f8d42d42c34f1cc1fac /spec/support/include_strings.rb | |
parent | 53c55cbf14899d83023cf2e9b11ed204e7b630d3 (diff) |
Refactoriza el suite de tests
Diffstat (limited to 'spec/support/include_strings.rb')
-rw-r--r-- | spec/support/include_strings.rb | 12 |
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 |