Sha256: 4173de358931d078bf20662bbe76f38062183a4cd926001f62df15c94cb425cb

Contents?: true

Size: 412 Bytes

Versions: 8

Compression:

Stored size: 412 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
    [ 1, 2, 3 ].should 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.1.8 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.7 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.6 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.5 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.4 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.3 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.2 spec/wildcard_matchers/helpers/for_any_spec.rb
wildcard_matchers-0.1.1 spec/wildcard_matchers/helpers/for_any_spec.rb