Sha256: 74ce02a3865c667ecf048f81bad7427ce83b81aa64764c00cd2e957b53f59043

Contents?: true

Size: 416 Bytes

Versions: 8

Compression:

Stored size: 416 Bytes

Contents

require "spec_helper"

describe WildcardMatchers::Helpers::ForAny do
  [ [ %w[ a b c ], :for_any, String ],
    [ [ 1, "1" ],  :for_any, String ],
  ].each do |actual, helper, matcher, *args|
    it_behaves_like "wildcard match with helper", actual, helper, matcher, *args
  end

  it "should match using lambda with helper" do
    expect([ 1, 2, 3 ]).to wildcard_match(for_any ->(item) { item % 2 == 0 })
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wildcard_matchers-0.9.2 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.9.1 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.9.0 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.4.0 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.3.1 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.3.0 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.2.1 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.2.0 spec/wildcard_matchers/helpers/for_any_spec.rb