Sha256: ce6858577768588c5e8743ddb59601c1084888a14bad151eea39cfb76f708926

Contents?: true

Size: 658 Bytes

Versions: 2

Compression:

Stored size: 658 Bytes

Contents

require 'helper'

class TestBlocking < Test::Unit::TestCase
  def test_001_encompass_one
    b = LooseTightDictionary::Blocking.new %r{apple}
    assert_equal true, b.encompass?('2 apples')
  end
  
  def test_002_encompass_both
    b = LooseTightDictionary::Blocking.new %r{apple}
    assert_equal true, b.encompass?('apple', '2 apples')    
  end
  
  def test_002_doesnt_encompass_both
    b = LooseTightDictionary::Blocking.new %r{apple}
    assert_equal false, b.encompass?('orange', '2 apples')
  end
  
  def test_003_no_information
    b = LooseTightDictionary::Blocking.new %r{apple}
    assert_equal nil, b.encompass?('orange', 'orange')
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
loose_tight_dictionary-0.1.1 test/test_blocking.rb
loose_tight_dictionary-0.1.0 test/test_blocking.rb