Sha256: cdf7a52e9bff16604a66d312dcff44122f27cf2413b5a153aa1ecb52f4f3b28b
Contents?: true
Size: 996 Bytes
Versions: 2
Compression:
Stored size: 996 Bytes
Contents
#enconding: utf-8 require 'spec_helper' require 'strategies_helper' describe Strategies::ContainsNotWithSubstringSearch do let(:data) { %w{ ab c e } } let(:exceptions) { %w{ a } } let(:keywords_overlap) { %w{ ab } } let(:keywords_no_overlap) { %w{ d } } it "is successfull when there's a no overlap" do sample = SampleDouble.new(data,keywords_no_overlap) comparator = Strategies::ContainsNotWithSubstringSearch.new(sample) expect(comparator.success?).to eq(true) end it "doesn't find something if there's an overlap" do sample = SampleDouble.new(data,keywords_overlap) comparator = Strategies::ContainsNotWithSubstringSearch.new(sample) expect(comparator.success?).to eq(false) end it "is successfull although there's an overlap, but an exception defined" do sample = SampleDouble.new(data,keywords_overlap, exceptions) comparator = Strategies::ContainsNotWithSubstringSearch.new(sample) expect(comparator.success?).to eq(true) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
the_array_comparator-0.2.0 | spec/comparator/contains_not_with_substring_search_spec.rb |
the_array_comparator-0.1.1 | spec/comparator/contains_not_with_substring_search_spec.rb |