1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# frozen_string_literal: true
# @!method a_path_matching_pattern(/pattern/)
# This matchers checks if <path> matches pattern. `pattern` can be a string,
# regexp or an RSpec matcher.
#
# @param [String, Regexp, Matcher] pattern
# Specifies the pattern
#
# @return [Boolean] The result
#
# false:
# * if pattern does not match
#
# true:
# * if pattern matches
#
# @example Use matcher with regexp
#
# RSpec.describe do
# it { expect(files).to include a_path_matching_pattern /asdf/ }
# end
RSpec::Matchers.alias_matcher :a_path_matching_pattern, :match
|