Sha256: be9191414291d682b400ff8e47cc888d6a527551bf24fd0fe590d579d0f7ea75
Contents?: true
Size: 807 Bytes
Versions: 5
Compression:
Stored size: 807 Bytes
Contents
require 'helper' describe FuzzyMatch::Rule::Grouping do it %{matches a single string argument} do b = FuzzyMatch::Rule::Grouping.new %r{apple} b.match?('2 apples').must_equal true end it %{embraces case insensitivity} do b = FuzzyMatch::Rule::Grouping.new %r{apple}i b.match?('2 Apples').must_equal true end it %{joins two string arguments} do b = FuzzyMatch::Rule::Grouping.new %r{apple} b.join?('apple', '2 apples').must_equal true end it %{fails to join two string arguments} do b = FuzzyMatch::Rule::Grouping.new %r{apple} b.join?('orange', '2 apples').must_equal false end it %{returns nil instead of false when it has no information} do b = FuzzyMatch::Rule::Grouping.new %r{apple} b.join?('orange', 'orange').must_be_nil end end
Version data entries
5 entries across 5 versions & 1 rubygems