Sha256: befa625f81da2e1787c3bd3d1386fda8bf1b1e7ff9f68af3d7cb64816950f796

Contents?: true

Size: 652 Bytes

Versions: 35

Compression:

Stored size: 652 Bytes

Contents

# @!method include_regexp(regexp)
#   This matchers checks if items of an <array> matches regexp
#
#   @param [Regexp] regexp
#     The regular expression to use
#
#   @return [TrueClass, FalseClass] The result
#
#     false:
#     * if regexp does not match
#     true:
#     * if regexp matches
#
#   @example Use matcher
#
#     RSpec.describe do
#       it { expect(%w(asdf qwert)).to include_regexp(/asdf/) }
#     end
RSpec::Matchers.define :include_regexp do |expected|
  match do |actual|
    Aruba.platform.deprecated('The use of "include_regexp"-matchers is deprecated. It will be removed soon.')

    !actual.grep(expected).empty?
  end
end

Version data entries

35 entries across 35 versions & 3 rubygems

Version Path
aruba-0.14.14 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.13 lib/aruba/matchers/rspec_matcher_include_regexp.rb
honeybadger-4.5.3 vendor/bundle/ruby/2.6.0/gems/aruba-0.14.12/lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.12 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.11 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.10 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.9 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.8 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.7 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.6 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.5 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.4 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.3 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-1.0.0.pre.alpha.2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-1.0.0.pre.alpha.1 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-win-fix-0.14.2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.1 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.14.0 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.13.0 lib/aruba/matchers/rspec_matcher_include_regexp.rb