Sha256: 5885dc4ffb8be01eb02d82322f92d73377c712488ff2c0cb2a0daf297c73064f
Contents?: true
Size: 774 Bytes
Versions: 2
Compression:
Stored size: 774 Bytes
Contents
require 'helper' class TestBlocking < MiniTest::Spec it %{matches a single string argument} do b = FuzzyMatch::Blocking.new %r{apple} b.match?('2 apples').must_equal true end it %{embraces case insensitivity} do b = FuzzyMatch::Blocking.new %r{apple}i b.match?('2 Apples').must_equal true end it %{joins two string arguments} do b = FuzzyMatch::Blocking.new %r{apple} b.join?('apple', '2 apples').must_equal true end it %{fails to join two string arguments} do b = FuzzyMatch::Blocking.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::Blocking.new %r{apple} b.join?('orange', 'orange').must_be_nil end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fuzzy_match-1.3.1 | test/test_blocking.rb |
fuzzy_match-1.3.0 | test/test_blocking.rb |