PageRenderTime 31ms CodeModel.GetById 17ms app.highlight 9ms RepoModel.GetById 1ms app.codeStats 0ms

/spec/jaro_winkler_spec.rb

https://github.com/gthole/rubyfish
Ruby | 22 lines | 14 code | 7 blank | 1 comment | 1 complexity | 3ab4b787e6aba89230ef3aa9f03ce9b7 MD5 | raw file
 1#encoding: utf-8
 2
 3require 'spec_helper'
 4
 5describe RubyFish::JaroWinkler do
 6
 7  it "should calculate distance" do
 8
 9    subject.should close_to_cases([
10      ["dixon", "dicksonx", 0.8133],
11      ["dixon", "dicksonx", 0.8133],
12      ["martha", "marhta", 0.9611],
13      ["dwayne", "duane", 0.84]
14    ])
15
16  end
17
18  it "should work with nils"  do
19    subject.distance(nil, nil).should == 1
20  end
21
22end