Sha256: d7083ef9b67a7cc9a64fb911d254662b655c0545b7e36594b414e0cf583b40b6

Contents?: true

Size: 463 Bytes

Versions: 9

Compression:

Stored size: 463 Bytes

Contents

require "spec_helper"

describe WildcardMatchers::Helpers::ForAll do
  [ [ %w[ a b c ], :for_all, String ],
    [ %w[ a b c ], :for_all, :is_a_string ],
    [ %w[ a b c ], :for_all, :is_a, 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
    [ 2, 4, 6].should wildcard_match(for_all ->(item) { item % 2 == 0 })
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
wildcard_matchers-0.1.8 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.7 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.6 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.5 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.4 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.3 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.2 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.1 spec/wildcard_matchers/helpers/for_all_spec.rb
wildcard_matchers-0.1.0 spec/wildcard_matchers/helpers/for_all_spec.rb