Sha256: 5be6c853441e3164fc43e2528d420bb0a397d359e312fd12effa7b4279a8423b

Contents?: true

Size: 625 Bytes

Versions: 9

Compression:

Stored size: 625 Bytes

Contents

require 'helper'

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
loose_tight_dictionary-1.0.5 test/test_blocking.rb
loose_tight_dictionary-1.0.4 test/test_blocking.rb
loose_tight_dictionary-1.0.3 test/test_blocking.rb
loose_tight_dictionary-1.0.2 test/test_blocking.rb
loose_tight_dictionary-1.0.1 test/test_blocking.rb
loose_tight_dictionary-1.0.0 test/test_blocking.rb
loose_tight_dictionary-0.2.3 test/test_blocking.rb
loose_tight_dictionary-0.2.2 test/test_blocking.rb
loose_tight_dictionary-0.2.1 test/test_blocking.rb