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.12.0 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.1 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.0.pre4 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.0.pre3 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.0.pre2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.11.0.pre lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.10.2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.10.1 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.10.0 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.10.0.pre2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.10.0.pre lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.9.0 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.9.0.pre2 lib/aruba/matchers/rspec_matcher_include_regexp.rb
aruba-0.9.0.pre lib/aruba/matchers/rspec_matcher_include_regexp.rb