Sha256: ff8a6af09780dc73358eb2ff47009976ca63e3883215818464301b89d75ed33e

Contents?: true

Size: 585 Bytes

Versions: 3

Compression:

Stored size: 585 Bytes

Contents

require 'helper'

class TestBlocking < Test::Unit::TestCase
  def test_001_match_one
    b = FuzzyMatch::Blocking.new %r{apple}
    assert_equal true, b.match?('2 apples')
  end
  
  def test_002_join_both
    b = FuzzyMatch::Blocking.new %r{apple}
    assert_equal true, b.join?('apple', '2 apples')    
  end
  
  def test_002_doesnt_join_both
    b = FuzzyMatch::Blocking.new %r{apple}
    assert_equal false, b.join?('orange', '2 apples')
  end
  
  def test_003_no_information
    b = FuzzyMatch::Blocking.new %r{apple}
    assert_equal nil, b.join?('orange', 'orange')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fuzzy_match-1.1.1 test/test_blocking.rb
fuzzy_match-1.1.0 test/test_blocking.rb
fuzzy_match-1.0.5 test/test_blocking.rb