close_enough 0.0.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/spec/close_enough_spec.rb +13 -0
- metadata +5 -5
data/spec/close_enough_spec.rb
CHANGED
@@ -17,7 +17,20 @@ module CloseEnoughSpec
|
|
17
17
|
@obj.frozne.should == true
|
18
18
|
end
|
19
19
|
|
20
|
+
it "should raise NoMethodError if the edit distance is >= 3" do
|
21
|
+
expect {@obj.sjdhs}.to raise_error(NoMethodError)
|
22
|
+
end
|
23
|
+
end
|
20
24
|
|
25
|
+
describe "it should call the closest method on String" do
|
26
|
+
|
27
|
+
it "should return the length when lentgh is called" do
|
28
|
+
"wibble".lentgh.should == 6
|
29
|
+
end
|
30
|
+
|
31
|
+
it "should reverse a string" do
|
32
|
+
"parsnip".reserve.should == "pinsrap"
|
33
|
+
end
|
21
34
|
end
|
22
35
|
|
23
36
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: close_enough
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -35,7 +35,7 @@ dependencies:
|
|
35
35
|
requirements:
|
36
36
|
- - ~>
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version: 2.
|
38
|
+
version: 2.13.0
|
39
39
|
type: :development
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 2.
|
46
|
+
version: 2.13.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,7 +51,7 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 10.0.3
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - ~>
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 10.0.3
|
63
63
|
description: close_enough patches method_missing to calculate the Damerau-Levenshtein
|
64
64
|
distance between what you typed, and the existing methods on the current receiver.
|
65
65
|
So typos are no longer a big deal.
|