linguistics 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. checksums.yaml.gz.sig +0 -0
  3. data.tar.gz.sig +0 -0
  4. data/.simplecov +12 -0
  5. data/ChangeLog +773 -11
  6. data/History.rdoc +9 -0
  7. data/Manifest.txt +3 -2
  8. data/README.rdoc +5 -5
  9. data/Rakefile +49 -19
  10. data/examples/generalize_sentence.rb +2 -2
  11. data/lib/linguistics.rb +4 -4
  12. data/lib/linguistics/en/articles.rb +1 -1
  13. data/lib/linguistics/en/conjugation.rb +6 -6
  14. data/lib/linguistics/en/conjunctions.rb +1 -1
  15. data/lib/linguistics/en/infinitives.rb +1 -1
  16. data/lib/linguistics/en/linkparser.rb +11 -11
  17. data/lib/linguistics/en/numbers.rb +11 -11
  18. data/lib/linguistics/en/participles.rb +1 -1
  19. data/lib/linguistics/en/pluralization.rb +16 -16
  20. data/lib/linguistics/en/wordnet.rb +1 -1
  21. data/lib/linguistics/languagebehavior.rb +1 -1
  22. data/spec/{lib/constants.rb → constants.rb} +0 -0
  23. data/spec/helpers.rb +39 -0
  24. data/spec/linguistics/en/articles_spec.rb +194 -203
  25. data/spec/linguistics/en/conjugation_spec.rb +519 -521
  26. data/spec/linguistics/en/conjunctions_spec.rb +31 -47
  27. data/spec/linguistics/en/infinitives_spec.rb +193 -207
  28. data/spec/linguistics/en/linkparser_spec.rb +9 -20
  29. data/spec/linguistics/en/numbers_spec.rb +289 -302
  30. data/spec/linguistics/en/participles_spec.rb +6 -20
  31. data/spec/linguistics/en/pluralization_spec.rb +894 -908
  32. data/spec/linguistics/en/stemmer_spec.rb +10 -23
  33. data/spec/linguistics/en/titlecase_spec.rb +3 -13
  34. data/spec/linguistics/en/wordnet_spec.rb +10 -30
  35. data/spec/linguistics/en_spec.rb +14 -28
  36. data/spec/linguistics/inflector_spec.rb +3 -21
  37. data/spec/linguistics/iso639_spec.rb +28 -37
  38. data/spec/linguistics/monkeypatches_spec.rb +5 -14
  39. data/spec/linguistics_spec.rb +11 -30
  40. metadata +44 -15
  41. metadata.gz.sig +0 -0
  42. data/spec/lib/helpers.rb +0 -38
@@ -1,17 +1,8 @@
1
1
  #!/usr/bin/env spec -cfs
2
2
 
3
- BEGIN {
4
- require 'pathname'
5
- basedir = Pathname.new( __FILE__ ).dirname.parent.parent.parent
6
-
7
- libdir = basedir + "lib"
8
-
9
- $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
10
- $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
11
- }
3
+ require_relative '../../helpers'
12
4
 
13
5
  require 'rspec'
14
- require 'spec/lib/helpers'
15
6
 
16
7
  require 'linguistics'
17
8
  require 'linguistics/en/linkparser'
@@ -20,17 +11,12 @@ require 'linguistics/en/linkparser'
20
11
  describe Linguistics::EN::LinkParser do
21
12
 
22
13
  before( :all ) do
23
- setup_logging( :fatal )
24
14
  Linguistics.use( :en )
25
15
  end
26
16
 
27
- after( :all ) do
28
- reset_logging()
29
- end
30
-
31
17
 
32
18
  it "adds EN::LinkParser to the list of English language modules" do
33
- Linguistics::EN::MODULES.include?( Linguistics::EN::LinkParser )
19
+ expect( Linguistics::EN::MODULES ).to include( Linguistics::EN::LinkParser )
34
20
  end
35
21
 
36
22
 
@@ -39,7 +25,7 @@ describe Linguistics::EN::LinkParser do
39
25
  it "can create a LinkParser::Sentence from a sentence in a string" do
40
26
  pending "installation of the linkparser library" unless
41
27
  Linguistics::EN.has_linkparser?
42
- "This is a sentence.".en.sentence.should be_a( LinkParser::Sentence )
28
+ expect( "This is a sentence.".en.sentence ).to be_a( LinkParser::Sentence )
43
29
  end
44
30
 
45
31
  end
@@ -50,9 +36,12 @@ describe Linguistics::EN::LinkParser do
50
36
 
51
37
  # If the system *does* have linkparser support, pretend it doesn't.
52
38
  if Linguistics::EN.has_linkparser?
53
- Linguistics::EN::LinkParser.stub( :has_linkparser? ).and_return( false )
54
- exception = stub( "linkparser load error", :message => 'no such file to load' )
55
- Linguistics::EN::LinkParser.stub( :lp_error ).and_return( exception )
39
+ exception = LoadError.new( 'no such file to load -- linkparser' )
40
+
41
+ allow( Linguistics::EN::LinkParser ).to receive( :has_linkparser? ).
42
+ and_return( false )
43
+ allow( Linguistics::EN::LinkParser ).to receive( :lp_error ).
44
+ and_return( exception )
56
45
  end
57
46
 
58
47
  expect {
@@ -1,17 +1,8 @@
1
1
  #!/usr/bin/env spec -cfs
2
2
 
3
- BEGIN {
4
- require 'pathname'
5
- basedir = Pathname.new( __FILE__ ).dirname.parent.parent.parent
6
-
7
- libdir = basedir + "lib"
8
-
9
- $LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
10
- $LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
11
- }
3
+ require_relative '../../helpers'
12
4
 
13
5
  require 'rspec'
14
- require 'spec/lib/helpers'
15
6
 
16
7
  require 'linguistics'
17
8
  require 'linguistics/en/numbers'
@@ -20,1272 +11,1268 @@ require 'linguistics/en/numbers'
20
11
  describe Linguistics::EN::Numbers do
21
12
 
22
13
  before( :all ) do
23
- setup_logging( :fatal )
24
14
  Linguistics.use( :en )
25
15
  end
26
16
 
27
- after( :all ) do
28
- reset_logging()
29
- end
30
-
31
17
 
32
18
  it "adds EN::Numbers to the list of English language modules" do
33
- Linguistics::EN.should have_extension( :numbers )
19
+ expect( Linguistics::EN ).to have_extension( :numbers )
34
20
  end
35
21
 
22
+
36
23
  describe "numbers to words" do
37
24
 
38
25
  it "can transform 0 into english words" do
39
- "0".en.numwords.should == "zero"
26
+ expect( "0".en.numwords ).to eq( "zero" )
40
27
  end
41
28
 
42
29
  it "can transform 0 into english words in single-digit groups" do
43
- "0".en.numwords( :group => 1 ).should == "zero"
30
+ expect( "0".en.numwords(group: 1) ).to eq( "zero" )
44
31
  end
45
32
 
46
33
  it "can transform 0 into english words in double-digit groups" do
47
- "0".en.numwords( :group => 2 ).should == "zero"
34
+ expect( "0".en.numwords(group: 2) ).to eq( "zero" )
48
35
  end
49
36
 
50
37
  it "can transform 0 into english words in triple-digit groups" do
51
- "0".en.numwords( :group => 3 ).should == "zero"
38
+ expect( "0".en.numwords(group: 3) ).to eq( "zero" )
52
39
  end
53
40
 
54
41
 
55
42
  it "can transform the english words for 0 into an ordinal" do
56
- "0".en.numwords.en.ordinal.should.should == "zeroth"
43
+ expect( "0".en.numwords.en.ordinal ).to eq( "zeroth" )
57
44
  end
58
45
 
59
46
 
60
47
  it "can transform 1 into english words" do
61
- "1".en.numwords.should == "one"
48
+ expect( "1".en.numwords ).to eq( "one" )
62
49
  end
63
50
 
64
51
  it "can transform 1 into english words in single-digit groups" do
65
- "1".en.numwords( :group => 1 ).should == "one"
52
+ expect( "1".en.numwords(group: 1) ).to eq( "one" )
66
53
  end
67
54
 
68
55
  it "can transform 1 into english words in double-digit groups" do
69
- "1".en.numwords( :group => 2 ).should == "one"
56
+ expect( "1".en.numwords(group: 2) ).to eq( "one" )
70
57
  end
71
58
 
72
59
  it "can transform 1 into english words in triple-digit groups" do
73
- "1".en.numwords( :group => 3 ).should == "one"
60
+ expect( "1".en.numwords(group: 3) ).to eq( "one" )
74
61
  end
75
62
 
76
63
 
77
64
  it "can transform the english words for 1 into an ordinal" do
78
- "1".en.numwords.en.ordinal.should == "first"
65
+ expect( "1".en.numwords.en.ordinal ).to eq( "first" )
79
66
  end
80
67
 
81
68
 
82
69
  it "can transform 2 into english words" do
83
- "2".en.numwords.should == "two"
70
+ expect( "2".en.numwords ).to eq( "two" )
84
71
  end
85
72
 
86
73
  it "can transform 2 into english words in single-digit groups" do
87
- "2".en.numwords( :group => 1 ).should == "two"
74
+ expect( "2".en.numwords(group: 1) ).to eq( "two" )
88
75
  end
89
76
 
90
77
  it "can transform 2 into english words in double-digit groups" do
91
- "2".en.numwords( :group => 2 ).should == "two"
78
+ expect( "2".en.numwords(group: 2) ).to eq( "two" )
92
79
  end
93
80
 
94
81
  it "can transform 2 into english words in triple-digit groups" do
95
- "2".en.numwords( :group => 3 ).should == "two"
82
+ expect( "2".en.numwords(group: 3) ).to eq( "two" )
96
83
  end
97
84
 
98
85
 
99
86
  it "can transform the english words for 2 into an ordinal" do
100
- "2".en.numwords.en.ordinal.should == "second"
87
+ expect( "2".en.numwords.en.ordinal ).to eq( "second" )
101
88
  end
102
89
 
103
90
 
104
91
  it "can transform 3 into english words" do
105
- "3".en.numwords.should == "three"
92
+ expect( "3".en.numwords ).to eq( "three" )
106
93
  end
107
94
 
108
95
  it "can transform 3 into english words in single-digit groups" do
109
- "3".en.numwords( :group => 1 ).should == "three"
96
+ expect( "3".en.numwords(group: 1) ).to eq( "three" )
110
97
  end
111
98
 
112
99
  it "can transform 3 into english words in double-digit groups" do
113
- "3".en.numwords( :group => 2 ).should == "three"
100
+ expect( "3".en.numwords(group: 2) ).to eq( "three" )
114
101
  end
115
102
 
116
103
  it "can transform 3 into english words in triple-digit groups" do
117
- "3".en.numwords( :group => 3 ).should == "three"
104
+ expect( "3".en.numwords(group: 3) ).to eq( "three" )
118
105
  end
119
106
 
120
107
 
121
108
  it "can transform the english words for 3 into an ordinal" do
122
- "3".en.numwords.en.ordinal.should == "third"
109
+ expect( "3".en.numwords.en.ordinal ).to eq( "third" )
123
110
  end
124
111
 
125
112
 
126
113
  it "can transform 4 into english words" do
127
- "4".en.numwords.should == "four"
114
+ expect( "4".en.numwords ).to eq( "four" )
128
115
  end
129
116
 
130
117
  it "can transform 4 into english words in single-digit groups" do
131
- "4".en.numwords( :group => 1 ).should == "four"
118
+ expect( "4".en.numwords(group: 1) ).to eq( "four" )
132
119
  end
133
120
 
134
121
  it "can transform 4 into english words in double-digit groups" do
135
- "4".en.numwords( :group => 2 ).should == "four"
122
+ expect( "4".en.numwords(group: 2) ).to eq( "four" )
136
123
  end
137
124
 
138
125
  it "can transform 4 into english words in triple-digit groups" do
139
- "4".en.numwords( :group => 3 ).should == "four"
126
+ expect( "4".en.numwords(group: 3) ).to eq( "four" )
140
127
  end
141
128
 
142
129
 
143
130
  it "can transform the english words for 4 into an ordinal" do
144
- "4".en.numwords.en.ordinal.should == "fourth"
131
+ expect( "4".en.numwords.en.ordinal ).to eq( "fourth" )
145
132
  end
146
133
 
147
134
 
148
135
  it "can transform 5 into english words" do
149
- "5".en.numwords.should == "five"
136
+ expect( "5".en.numwords ).to eq( "five" )
150
137
  end
151
138
 
152
139
  it "can transform 5 into english words in single-digit groups" do
153
- "5".en.numwords( :group => 1 ).should == "five"
140
+ expect( "5".en.numwords(group: 1) ).to eq( "five" )
154
141
  end
155
142
 
156
143
  it "can transform 5 into english words in double-digit groups" do
157
- "5".en.numwords( :group => 2 ).should == "five"
144
+ expect( "5".en.numwords(group: 2) ).to eq( "five" )
158
145
  end
159
146
 
160
147
  it "can transform 5 into english words in triple-digit groups" do
161
- "5".en.numwords( :group => 3 ).should == "five"
148
+ expect( "5".en.numwords(group: 3) ).to eq( "five" )
162
149
  end
163
150
 
164
151
 
165
152
  it "can transform the english words for 5 into an ordinal" do
166
- "5".en.numwords.en.ordinal.should == "fifth"
153
+ expect( "5".en.numwords.en.ordinal ).to eq( "fifth" )
167
154
  end
168
155
 
169
156
 
170
157
  it "can transform 6 into english words" do
171
- "6".en.numwords.should == "six"
158
+ expect( "6".en.numwords ).to eq( "six" )
172
159
  end
173
160
 
174
161
  it "can transform 6 into english words in single-digit groups" do
175
- "6".en.numwords( :group => 1 ).should == "six"
162
+ expect( "6".en.numwords(group: 1) ).to eq( "six" )
176
163
  end
177
164
 
178
165
  it "can transform 6 into english words in double-digit groups" do
179
- "6".en.numwords( :group => 2 ).should == "six"
166
+ expect( "6".en.numwords(group: 2) ).to eq( "six" )
180
167
  end
181
168
 
182
169
  it "can transform 6 into english words in triple-digit groups" do
183
- "6".en.numwords( :group => 3 ).should == "six"
170
+ expect( "6".en.numwords(group: 3) ).to eq( "six" )
184
171
  end
185
172
 
186
173
 
187
174
  it "can transform the english words for 6 into an ordinal" do
188
- "6".en.numwords.en.ordinal.should == "sixth"
175
+ expect( "6".en.numwords.en.ordinal ).to eq( "sixth" )
189
176
  end
190
177
 
191
178
 
192
179
  it "can transform 7 into english words" do
193
- "7".en.numwords.should == "seven"
180
+ expect( "7".en.numwords ).to eq( "seven" )
194
181
  end
195
182
 
196
183
  it "can transform 7 into english words in single-digit groups" do
197
- "7".en.numwords( :group => 1 ).should == "seven"
184
+ expect( "7".en.numwords(group: 1) ).to eq( "seven" )
198
185
  end
199
186
 
200
187
  it "can transform 7 into english words in double-digit groups" do
201
- "7".en.numwords( :group => 2 ).should == "seven"
188
+ expect( "7".en.numwords(group: 2) ).to eq( "seven" )
202
189
  end
203
190
 
204
191
  it "can transform 7 into english words in triple-digit groups" do
205
- "7".en.numwords( :group => 3 ).should == "seven"
192
+ expect( "7".en.numwords(group: 3) ).to eq( "seven" )
206
193
  end
207
194
 
208
195
 
209
196
  it "can transform the english words for 7 into an ordinal" do
210
- "7".en.numwords.en.ordinal.should == "seventh"
197
+ expect( "7".en.numwords.en.ordinal ).to eq( "seventh" )
211
198
  end
212
199
 
213
200
 
214
201
  it "can transform 8 into english words" do
215
- "8".en.numwords.should == "eight"
202
+ expect( "8".en.numwords ).to eq( "eight" )
216
203
  end
217
204
 
218
205
  it "can transform 8 into english words in single-digit groups" do
219
- "8".en.numwords( :group => 1 ).should == "eight"
206
+ expect( "8".en.numwords(group: 1) ).to eq( "eight" )
220
207
  end
221
208
 
222
209
  it "can transform 8 into english words in double-digit groups" do
223
- "8".en.numwords( :group => 2 ).should == "eight"
210
+ expect( "8".en.numwords(group: 2) ).to eq( "eight" )
224
211
  end
225
212
 
226
213
  it "can transform 8 into english words in triple-digit groups" do
227
- "8".en.numwords( :group => 3 ).should == "eight"
214
+ expect( "8".en.numwords(group: 3) ).to eq( "eight" )
228
215
  end
229
216
 
230
217
 
231
218
  it "can transform the english words for 8 into an ordinal" do
232
- "8".en.numwords.en.ordinal.should == "eighth"
219
+ expect( "8".en.numwords.en.ordinal ).to eq( "eighth" )
233
220
  end
234
221
 
235
222
 
236
223
  it "can transform 9 into english words" do
237
- "9".en.numwords.should == "nine"
224
+ expect( "9".en.numwords ).to eq( "nine" )
238
225
  end
239
226
 
240
227
  it "can transform 9 into english words in single-digit groups" do
241
- "9".en.numwords( :group => 1 ).should == "nine"
228
+ expect( "9".en.numwords(group: 1) ).to eq( "nine" )
242
229
  end
243
230
 
244
231
  it "can transform 9 into english words in double-digit groups" do
245
- "9".en.numwords( :group => 2 ).should == "nine"
232
+ expect( "9".en.numwords(group: 2) ).to eq( "nine" )
246
233
  end
247
234
 
248
235
  it "can transform 9 into english words in triple-digit groups" do
249
- "9".en.numwords( :group => 3 ).should == "nine"
236
+ expect( "9".en.numwords(group: 3) ).to eq( "nine" )
250
237
  end
251
238
 
252
239
 
253
240
  it "can transform the english words for 9 into an ordinal" do
254
- "9".en.numwords.en.ordinal.should == "ninth"
241
+ expect( "9".en.numwords.en.ordinal ).to eq( "ninth" )
255
242
  end
256
243
 
257
244
 
258
245
  it "can transform 10 into english words" do
259
- "10".en.numwords.should == "ten"
246
+ expect( "10".en.numwords ).to eq( "ten" )
260
247
  end
261
248
 
262
249
  it "can transform 10 into english words in single-digit groups" do
263
- "10".en.numwords( :group => 1 ).should == "one, zero"
250
+ expect( "10".en.numwords(group: 1) ).to eq( "one, zero" )
264
251
  end
265
252
 
266
253
  it "can transform 10 into english words in double-digit groups" do
267
- "10".en.numwords( :group => 2 ).should == "ten"
254
+ expect( "10".en.numwords(group: 2) ).to eq( "ten" )
268
255
  end
269
256
 
270
257
  it "can transform 10 into english words in triple-digit groups" do
271
- "10".en.numwords( :group => 3 ).should == "ten"
258
+ expect( "10".en.numwords(group: 3) ).to eq( "ten" )
272
259
  end
273
260
 
274
261
 
275
262
  it "can transform the english words for 10 into an ordinal" do
276
- "10".en.numwords.en.ordinal.should == "tenth"
263
+ expect( "10".en.numwords.en.ordinal ).to eq( "tenth" )
277
264
  end
278
265
 
279
266
 
280
267
  it "can transform 11 into english words" do
281
- "11".en.numwords.should == "eleven"
268
+ expect( "11".en.numwords ).to eq( "eleven" )
282
269
  end
283
270
 
284
271
  it "can transform 11 into english words in single-digit groups" do
285
- "11".en.numwords( :group => 1 ).should == "one, one"
272
+ expect( "11".en.numwords(group: 1) ).to eq( "one, one" )
286
273
  end
287
274
 
288
275
  it "can transform 11 into english words in double-digit groups" do
289
- "11".en.numwords( :group => 2 ).should == "eleven"
276
+ expect( "11".en.numwords(group: 2) ).to eq( "eleven" )
290
277
  end
291
278
 
292
279
  it "can transform 11 into english words in triple-digit groups" do
293
- "11".en.numwords( :group => 3 ).should == "eleven"
280
+ expect( "11".en.numwords(group: 3) ).to eq( "eleven" )
294
281
  end
295
282
 
296
283
 
297
284
  it "can transform the english words for 11 into an ordinal" do
298
- "11".en.numwords.en.ordinal.should == "eleventh"
285
+ expect( "11".en.numwords.en.ordinal ).to eq( "eleventh" )
299
286
  end
300
287
 
301
288
 
302
289
  it "can transform 12 into english words" do
303
- "12".en.numwords.should == "twelve"
290
+ expect( "12".en.numwords ).to eq( "twelve" )
304
291
  end
305
292
 
306
293
  it "can transform 12 into english words in single-digit groups" do
307
- "12".en.numwords( :group => 1 ).should == "one, two"
294
+ expect( "12".en.numwords(group: 1) ).to eq( "one, two" )
308
295
  end
309
296
 
310
297
  it "can transform 12 into english words in double-digit groups" do
311
- "12".en.numwords( :group => 2 ).should == "twelve"
298
+ expect( "12".en.numwords(group: 2) ).to eq( "twelve" )
312
299
  end
313
300
 
314
301
  it "can transform 12 into english words in triple-digit groups" do
315
- "12".en.numwords( :group => 3 ).should == "twelve"
302
+ expect( "12".en.numwords(group: 3) ).to eq( "twelve" )
316
303
  end
317
304
 
318
305
 
319
306
  it "can transform the english words for 12 into an ordinal" do
320
- "12".en.numwords.en.ordinal.should == "twelfth"
307
+ expect( "12".en.numwords.en.ordinal ).to eq( "twelfth" )
321
308
  end
322
309
 
323
310
 
324
311
  it "can transform 13 into english words" do
325
- "13".en.numwords.should == "thirteen"
312
+ expect( "13".en.numwords ).to eq( "thirteen" )
326
313
  end
327
314
 
328
315
  it "can transform 13 into english words in single-digit groups" do
329
- "13".en.numwords( :group => 1 ).should == "one, three"
316
+ expect( "13".en.numwords(group: 1) ).to eq( "one, three" )
330
317
  end
331
318
 
332
319
  it "can transform 13 into english words in double-digit groups" do
333
- "13".en.numwords( :group => 2 ).should == "thirteen"
320
+ expect( "13".en.numwords(group: 2) ).to eq( "thirteen" )
334
321
  end
335
322
 
336
323
  it "can transform 13 into english words in triple-digit groups" do
337
- "13".en.numwords( :group => 3 ).should == "thirteen"
324
+ expect( "13".en.numwords(group: 3) ).to eq( "thirteen" )
338
325
  end
339
326
 
340
327
 
341
328
  it "can transform the english words for 13 into an ordinal" do
342
- "13".en.numwords.en.ordinal.should == "thirteenth"
329
+ expect( "13".en.numwords.en.ordinal ).to eq( "thirteenth" )
343
330
  end
344
331
 
345
332
 
346
333
  it "can transform 14 into english words" do
347
- "14".en.numwords.should == "fourteen"
334
+ expect( "14".en.numwords ).to eq( "fourteen" )
348
335
  end
349
336
 
350
337
  it "can transform 14 into english words in single-digit groups" do
351
- "14".en.numwords( :group => 1 ).should == "one, four"
338
+ expect( "14".en.numwords(group: 1) ).to eq( "one, four" )
352
339
  end
353
340
 
354
341
  it "can transform 14 into english words in double-digit groups" do
355
- "14".en.numwords( :group => 2 ).should == "fourteen"
342
+ expect( "14".en.numwords(group: 2) ).to eq( "fourteen" )
356
343
  end
357
344
 
358
345
  it "can transform 14 into english words in triple-digit groups" do
359
- "14".en.numwords( :group => 3 ).should == "fourteen"
346
+ expect( "14".en.numwords(group: 3) ).to eq( "fourteen" )
360
347
  end
361
348
 
362
349
 
363
350
  it "can transform the english words for 14 into an ordinal" do
364
- "14".en.numwords.en.ordinal.should == "fourteenth"
351
+ expect( "14".en.numwords.en.ordinal ).to eq( "fourteenth" )
365
352
  end
366
353
 
367
354
 
368
355
  it "can transform 15 into english words" do
369
- "15".en.numwords.should == "fifteen"
356
+ expect( "15".en.numwords ).to eq( "fifteen" )
370
357
  end
371
358
 
372
359
  it "can transform 15 into english words in single-digit groups" do
373
- "15".en.numwords( :group => 1 ).should == "one, five"
360
+ expect( "15".en.numwords(group: 1) ).to eq( "one, five" )
374
361
  end
375
362
 
376
363
  it "can transform 15 into english words in double-digit groups" do
377
- "15".en.numwords( :group => 2 ).should == "fifteen"
364
+ expect( "15".en.numwords(group: 2) ).to eq( "fifteen" )
378
365
  end
379
366
 
380
367
  it "can transform 15 into english words in triple-digit groups" do
381
- "15".en.numwords( :group => 3 ).should == "fifteen"
368
+ expect( "15".en.numwords(group: 3) ).to eq( "fifteen" )
382
369
  end
383
370
 
384
371
 
385
372
  it "can transform the english words for 15 into an ordinal" do
386
- "15".en.numwords.en.ordinal.should == "fifteenth"
373
+ expect( "15".en.numwords.en.ordinal ).to eq( "fifteenth" )
387
374
  end
388
375
 
389
376
 
390
377
  it "can transform 16 into english words" do
391
- "16".en.numwords.should == "sixteen"
378
+ expect( "16".en.numwords ).to eq( "sixteen" )
392
379
  end
393
380
 
394
381
  it "can transform 16 into english words in single-digit groups" do
395
- "16".en.numwords( :group => 1 ).should == "one, six"
382
+ expect( "16".en.numwords(group: 1) ).to eq( "one, six" )
396
383
  end
397
384
 
398
385
  it "can transform 16 into english words in double-digit groups" do
399
- "16".en.numwords( :group => 2 ).should == "sixteen"
386
+ expect( "16".en.numwords(group: 2) ).to eq( "sixteen" )
400
387
  end
401
388
 
402
389
  it "can transform 16 into english words in triple-digit groups" do
403
- "16".en.numwords( :group => 3 ).should == "sixteen"
390
+ expect( "16".en.numwords(group: 3) ).to eq( "sixteen" )
404
391
  end
405
392
 
406
393
 
407
394
  it "can transform the english words for 16 into an ordinal" do
408
- "16".en.numwords.en.ordinal.should == "sixteenth"
395
+ expect( "16".en.numwords.en.ordinal ).to eq( "sixteenth" )
409
396
  end
410
397
 
411
398
 
412
399
  it "can transform 17 into english words" do
413
- "17".en.numwords.should == "seventeen"
400
+ expect( "17".en.numwords ).to eq( "seventeen" )
414
401
  end
415
402
 
416
403
  it "can transform 17 into english words in single-digit groups" do
417
- "17".en.numwords( :group => 1 ).should == "one, seven"
404
+ expect( "17".en.numwords(group: 1) ).to eq( "one, seven" )
418
405
  end
419
406
 
420
407
  it "can transform 17 into english words in double-digit groups" do
421
- "17".en.numwords( :group => 2 ).should == "seventeen"
408
+ expect( "17".en.numwords(group: 2) ).to eq( "seventeen" )
422
409
  end
423
410
 
424
411
  it "can transform 17 into english words in triple-digit groups" do
425
- "17".en.numwords( :group => 3 ).should == "seventeen"
412
+ expect( "17".en.numwords(group: 3) ).to eq( "seventeen" )
426
413
  end
427
414
 
428
415
 
429
416
  it "can transform the english words for 17 into an ordinal" do
430
- "17".en.numwords.en.ordinal.should == "seventeenth"
417
+ expect( "17".en.numwords.en.ordinal ).to eq( "seventeenth" )
431
418
  end
432
419
 
433
420
 
434
421
  it "can transform 18 into english words" do
435
- "18".en.numwords.should == "eighteen"
422
+ expect( "18".en.numwords ).to eq( "eighteen" )
436
423
  end
437
424
 
438
425
  it "can transform 18 into english words in single-digit groups" do
439
- "18".en.numwords( :group => 1 ).should == "one, eight"
426
+ expect( "18".en.numwords(group: 1) ).to eq( "one, eight" )
440
427
  end
441
428
 
442
429
  it "can transform 18 into english words in double-digit groups" do
443
- "18".en.numwords( :group => 2 ).should == "eighteen"
430
+ expect( "18".en.numwords(group: 2) ).to eq( "eighteen" )
444
431
  end
445
432
 
446
433
  it "can transform 18 into english words in triple-digit groups" do
447
- "18".en.numwords( :group => 3 ).should == "eighteen"
434
+ expect( "18".en.numwords(group: 3) ).to eq( "eighteen" )
448
435
  end
449
436
 
450
437
 
451
438
  it "can transform the english words for 18 into an ordinal" do
452
- "18".en.numwords.en.ordinal.should == "eighteenth"
439
+ expect( "18".en.numwords.en.ordinal ).to eq( "eighteenth" )
453
440
  end
454
441
 
455
442
 
456
443
  it "can transform 19 into english words" do
457
- "19".en.numwords.should == "nineteen"
444
+ expect( "19".en.numwords ).to eq( "nineteen" )
458
445
  end
459
446
 
460
447
  it "can transform 19 into english words in single-digit groups" do
461
- "19".en.numwords( :group => 1 ).should == "one, nine"
448
+ expect( "19".en.numwords(group: 1) ).to eq( "one, nine" )
462
449
  end
463
450
 
464
451
  it "can transform 19 into english words in double-digit groups" do
465
- "19".en.numwords( :group => 2 ).should == "nineteen"
452
+ expect( "19".en.numwords(group: 2) ).to eq( "nineteen" )
466
453
  end
467
454
 
468
455
  it "can transform 19 into english words in triple-digit groups" do
469
- "19".en.numwords( :group => 3 ).should == "nineteen"
456
+ expect( "19".en.numwords(group: 3) ).to eq( "nineteen" )
470
457
  end
471
458
 
472
459
 
473
460
  it "can transform the english words for 19 into an ordinal" do
474
- "19".en.numwords.en.ordinal.should == "nineteenth"
461
+ expect( "19".en.numwords.en.ordinal ).to eq( "nineteenth" )
475
462
  end
476
463
 
477
464
 
478
465
  it "can transform 20 into english words" do
479
- "20".en.numwords.should == "twenty"
466
+ expect( "20".en.numwords ).to eq( "twenty" )
480
467
  end
481
468
 
482
469
  it "can transform 20 into english words in single-digit groups" do
483
- "20".en.numwords( :group => 1 ).should == "two, zero"
470
+ expect( "20".en.numwords(group: 1) ).to eq( "two, zero" )
484
471
  end
485
472
 
486
473
  it "can transform 20 into english words in double-digit groups" do
487
- "20".en.numwords( :group => 2 ).should == "twenty"
474
+ expect( "20".en.numwords(group: 2) ).to eq( "twenty" )
488
475
  end
489
476
 
490
477
  it "can transform 20 into english words in triple-digit groups" do
491
- "20".en.numwords( :group => 3 ).should == "twenty"
478
+ expect( "20".en.numwords(group: 3) ).to eq( "twenty" )
492
479
  end
493
480
 
494
481
 
495
482
  it "can transform the english words for 20 into an ordinal" do
496
- "20".en.numwords.en.ordinal.should == "twentieth"
483
+ expect( "20".en.numwords.en.ordinal ).to eq( "twentieth" )
497
484
  end
498
485
 
499
486
 
500
487
  it "can transform 21 into english words" do
501
- "21".en.numwords.should == "twenty-one"
488
+ expect( "21".en.numwords ).to eq( "twenty-one" )
502
489
  end
503
490
 
504
491
  it "can transform 21 into english words in single-digit groups" do
505
- "21".en.numwords( :group => 1 ).should == "two, one"
492
+ expect( "21".en.numwords(group: 1) ).to eq( "two, one" )
506
493
  end
507
494
 
508
495
  it "can transform 21 into english words in double-digit groups" do
509
- "21".en.numwords( :group => 2 ).should == "twenty-one"
496
+ expect( "21".en.numwords(group: 2) ).to eq( "twenty-one" )
510
497
  end
511
498
 
512
499
  it "can transform 21 into english words in triple-digit groups" do
513
- "21".en.numwords( :group => 3 ).should == "twenty-one"
500
+ expect( "21".en.numwords(group: 3) ).to eq( "twenty-one" )
514
501
  end
515
502
 
516
503
 
517
504
  it "can transform the english words for 21 into an ordinal" do
518
- "21".en.numwords.en.ordinal.should == "twenty-first"
505
+ expect( "21".en.numwords.en.ordinal ).to eq( "twenty-first" )
519
506
  end
520
507
 
521
508
 
522
509
  it "can transform 29 into english words" do
523
- "29".en.numwords.should == "twenty-nine"
510
+ expect( "29".en.numwords ).to eq( "twenty-nine" )
524
511
  end
525
512
 
526
513
  it "can transform 29 into english words in single-digit groups" do
527
- "29".en.numwords( :group => 1 ).should == "two, nine"
514
+ expect( "29".en.numwords(group: 1) ).to eq( "two, nine" )
528
515
  end
529
516
 
530
517
  it "can transform 29 into english words in double-digit groups" do
531
- "29".en.numwords( :group => 2 ).should == "twenty-nine"
518
+ expect( "29".en.numwords(group: 2) ).to eq( "twenty-nine" )
532
519
  end
533
520
 
534
521
  it "can transform 29 into english words in triple-digit groups" do
535
- "29".en.numwords( :group => 3 ).should == "twenty-nine"
522
+ expect( "29".en.numwords(group: 3) ).to eq( "twenty-nine" )
536
523
  end
537
524
 
538
525
 
539
526
  it "can transform the english words for 29 into an ordinal" do
540
- "29".en.numwords.en.ordinal.should == "twenty-ninth"
527
+ expect( "29".en.numwords.en.ordinal ).to eq( "twenty-ninth" )
541
528
  end
542
529
 
543
530
 
544
531
  it "can transform 99 into english words" do
545
- "99".en.numwords.should == "ninety-nine"
532
+ expect( "99".en.numwords ).to eq( "ninety-nine" )
546
533
  end
547
534
 
548
535
  it "can transform 99 into english words in single-digit groups" do
549
- "99".en.numwords( :group => 1 ).should == "nine, nine"
536
+ expect( "99".en.numwords(group: 1) ).to eq( "nine, nine" )
550
537
  end
551
538
 
552
539
  it "can transform 99 into english words in double-digit groups" do
553
- "99".en.numwords( :group => 2 ).should == "ninety-nine"
540
+ expect( "99".en.numwords(group: 2) ).to eq( "ninety-nine" )
554
541
  end
555
542
 
556
543
  it "can transform 99 into english words in triple-digit groups" do
557
- "99".en.numwords( :group => 3 ).should == "ninety-nine"
544
+ expect( "99".en.numwords(group: 3) ).to eq( "ninety-nine" )
558
545
  end
559
546
 
560
547
 
561
548
  it "can transform the english words for 99 into an ordinal" do
562
- "99".en.numwords.en.ordinal.should == "ninety-ninth"
549
+ expect( "99".en.numwords.en.ordinal ).to eq( "ninety-ninth" )
563
550
  end
564
551
 
565
552
 
566
553
  it "can transform 100 into english words" do
567
- "100".en.numwords.should == "one hundred"
554
+ expect( "100".en.numwords ).to eq( "one hundred" )
568
555
  end
569
556
 
570
557
  it "can transform 100 into english words in single-digit groups" do
571
- "100".en.numwords( :group => 1 ).should == "one, zero, zero"
558
+ expect( "100".en.numwords(group: 1) ).to eq( "one, zero, zero" )
572
559
  end
573
560
 
574
561
  it "can transform 100 into english words in double-digit groups" do
575
- "100".en.numwords( :group => 2 ).should == "ten, zero"
562
+ expect( "100".en.numwords(group: 2) ).to eq( "ten, zero" )
576
563
  end
577
564
 
578
565
  it "can transform 100 into english words in triple-digit groups" do
579
- "100".en.numwords( :group => 3 ).should == "one zero zero"
566
+ expect( "100".en.numwords(group: 3) ).to eq( "one zero zero" )
580
567
  end
581
568
 
582
569
 
583
570
  it "can transform the english words for 100 into an ordinal" do
584
- "100".en.numwords.en.ordinal.should == "one hundredth"
571
+ expect( "100".en.numwords.en.ordinal ).to eq( "one hundredth" )
585
572
  end
586
573
 
587
574
 
588
575
  it "can transform 101 into english words" do
589
- "101".en.numwords.should == "one hundred and one"
576
+ expect( "101".en.numwords ).to eq( "one hundred and one" )
590
577
  end
591
578
 
592
579
  it "can transform 101 into english words in single-digit groups" do
593
- "101".en.numwords( :group => 1 ).should == "one, zero, one"
580
+ expect( "101".en.numwords(group: 1) ).to eq( "one, zero, one" )
594
581
  end
595
582
 
596
583
  it "can transform 101 into english words in double-digit groups" do
597
- "101".en.numwords( :group => 2 ).should == "ten, one"
584
+ expect( "101".en.numwords(group: 2) ).to eq( "ten, one" )
598
585
  end
599
586
 
600
587
  it "can transform 101 into english words in triple-digit groups" do
601
- "101".en.numwords( :group => 3 ).should == "one zero one"
588
+ expect( "101".en.numwords(group: 3) ).to eq( "one zero one" )
602
589
  end
603
590
 
604
591
 
605
592
  it "can transform the english words for 101 into an ordinal" do
606
- "101".en.numwords.en.ordinal.should == "one hundred and first"
593
+ expect( "101".en.numwords.en.ordinal ).to eq( "one hundred and first" )
607
594
  end
608
595
 
609
596
  it "can transform the english words for 101 into an ordinal" do
610
- "101".en.numwords.en.ordinal.should == "one hundred and first"
597
+ expect( "101".en.numwords.en.ordinal ).to eq( "one hundred and first" )
611
598
  end
612
599
 
613
600
 
614
601
  it "can transform 110 into english words" do
615
- "110".en.numwords.should == "one hundred and ten"
602
+ expect( "110".en.numwords ).to eq( "one hundred and ten" )
616
603
  end
617
604
 
618
605
  it "can transform 110 into english words in single-digit groups" do
619
- "110".en.numwords( :group => 1 ).should == "one, one, zero"
606
+ expect( "110".en.numwords(group: 1) ).to eq( "one, one, zero" )
620
607
  end
621
608
 
622
609
  it "can transform 110 into english words in double-digit groups" do
623
- "110".en.numwords( :group => 2 ).should == "eleven, zero"
610
+ expect( "110".en.numwords(group: 2) ).to eq( "eleven, zero" )
624
611
  end
625
612
 
626
613
  it "can transform 110 into english words in triple-digit groups" do
627
- "110".en.numwords( :group => 3 ).should == "one ten"
614
+ expect( "110".en.numwords(group: 3) ).to eq( "one ten" )
628
615
  end
629
616
 
630
617
 
631
618
  it "can transform the english words for 110 into an ordinal" do
632
- "110".en.numwords.en.ordinal.should == "one hundred and tenth"
619
+ expect( "110".en.numwords.en.ordinal ).to eq( "one hundred and tenth" )
633
620
  end
634
621
 
635
622
 
636
623
  it "can transform 111 into english words" do
637
- "111".en.numwords.should == "one hundred and eleven"
624
+ expect( "111".en.numwords ).to eq( "one hundred and eleven" )
638
625
  end
639
626
 
640
627
  it "can transform 111 into english words in single-digit groups" do
641
- "111".en.numwords( :group => 1 ).should == "one, one, one"
628
+ expect( "111".en.numwords(group: 1) ).to eq( "one, one, one" )
642
629
  end
643
630
 
644
631
  it "can transform 111 into english words in double-digit groups" do
645
- "111".en.numwords( :group => 2 ).should == "eleven, one"
632
+ expect( "111".en.numwords(group: 2) ).to eq( "eleven, one" )
646
633
  end
647
634
 
648
635
  it "can transform 111 into english words in triple-digit groups" do
649
- "111".en.numwords( :group => 3 ).should == "one eleven"
636
+ expect( "111".en.numwords(group: 3) ).to eq( "one eleven" )
650
637
  end
651
638
 
652
639
 
653
640
  it "can transform the english words for 111 into an ordinal" do
654
- "111".en.numwords.en.ordinal.should == "one hundred and eleventh"
641
+ expect( "111".en.numwords.en.ordinal ).to eq( "one hundred and eleventh" )
655
642
  end
656
643
 
657
644
 
658
645
  it "can transform 900 into english words" do
659
- "900".en.numwords.should == "nine hundred"
646
+ expect( "900".en.numwords ).to eq( "nine hundred" )
660
647
  end
661
648
 
662
649
  it "can transform 900 into english words in single-digit groups" do
663
- "900".en.numwords( :group => 1 ).should == "nine, zero, zero"
650
+ expect( "900".en.numwords(group: 1) ).to eq( "nine, zero, zero" )
664
651
  end
665
652
 
666
653
  it "can transform 900 into english words in double-digit groups" do
667
- "900".en.numwords( :group => 2 ).should == "ninety, zero"
654
+ expect( "900".en.numwords(group: 2) ).to eq( "ninety, zero" )
668
655
  end
669
656
 
670
657
  it "can transform 900 into english words in triple-digit groups" do
671
- "900".en.numwords( :group => 3 ).should == "nine zero zero"
658
+ expect( "900".en.numwords(group: 3) ).to eq( "nine zero zero" )
672
659
  end
673
660
 
674
661
 
675
662
  it "can transform the english words for 900 into an ordinal" do
676
- "900".en.numwords.en.ordinal.should == "nine hundredth"
663
+ expect( "900".en.numwords.en.ordinal ).to eq( "nine hundredth" )
677
664
  end
678
665
 
679
666
 
680
667
  it "can transform 999 into english words" do
681
- "999".en.numwords.should == "nine hundred and ninety-nine"
668
+ expect( "999".en.numwords ).to eq( "nine hundred and ninety-nine" )
682
669
  end
683
670
 
684
671
  it "can transform 999 into english words in single-digit groups" do
685
- "999".en.numwords( :group => 1 ).should == "nine, nine, nine"
672
+ expect( "999".en.numwords(group: 1) ).to eq( "nine, nine, nine" )
686
673
  end
687
674
 
688
675
  it "can transform 999 into english words in double-digit groups" do
689
- "999".en.numwords( :group => 2 ).should == "ninety-nine, nine"
676
+ expect( "999".en.numwords(group: 2) ).to eq( "ninety-nine, nine" )
690
677
  end
691
678
 
692
679
  it "can transform 999 into english words in triple-digit groups" do
693
- "999".en.numwords( :group => 3 ).should == "nine ninety-nine"
680
+ expect( "999".en.numwords(group: 3) ).to eq( "nine ninety-nine" )
694
681
  end
695
682
 
696
683
 
697
684
  it "can transform the english words for 999 into an ordinal" do
698
- "999".en.numwords.en.ordinal.should == "nine hundred and ninety-ninth"
685
+ expect( "999".en.numwords.en.ordinal ).to eq( "nine hundred and ninety-ninth" )
699
686
  end
700
687
 
701
688
 
702
689
  it "can transform 1000 into english words" do
703
- "1000".en.numwords.should == "one thousand"
690
+ expect( "1000".en.numwords ).to eq( "one thousand" )
704
691
  end
705
692
 
706
693
  it "can transform 1000 into english words in single-digit groups" do
707
- "1000".en.numwords( :group => 1 ).should == "one, zero, zero, zero"
694
+ expect( "1000".en.numwords(group: 1) ).to eq( "one, zero, zero, zero" )
708
695
  end
709
696
 
710
697
  it "can transform 1000 into english words in double-digit groups" do
711
- "1000".en.numwords( :group => 2 ).should == "ten, zero zero"
698
+ expect( "1000".en.numwords(group: 2) ).to eq( "ten, zero zero" )
712
699
  end
713
700
 
714
701
  it "can transform 1000 into english words in triple-digit groups" do
715
- "1000".en.numwords( :group => 3 ).should == "one zero zero, zero"
702
+ expect( "1000".en.numwords(group: 3) ).to eq( "one zero zero, zero" )
716
703
  end
717
704
 
718
705
 
719
706
  it "can transform the english words for 1000 into an ordinal" do
720
- "1000".en.numwords.en.ordinal.should == "one thousandth"
707
+ expect( "1000".en.numwords.en.ordinal ).to eq( "one thousandth" )
721
708
  end
722
709
 
723
710
 
724
711
  it "can transform 1001 into english words" do
725
- "1001".en.numwords.should == "one thousand and one"
712
+ expect( "1001".en.numwords ).to eq( "one thousand and one" )
726
713
  end
727
714
 
728
715
  it "can transform 1001 into english words in single-digit groups" do
729
- "1001".en.numwords( :group => 1 ).should == "one, zero, zero, one"
716
+ expect( "1001".en.numwords(group: 1) ).to eq( "one, zero, zero, one" )
730
717
  end
731
718
 
732
719
  it "can transform 1001 into english words in double-digit groups" do
733
- "1001".en.numwords( :group => 2 ).should == "ten, zero one"
720
+ expect( "1001".en.numwords(group: 2) ).to eq( "ten, zero one" )
734
721
  end
735
722
 
736
723
  it "can transform 1001 into english words in triple-digit groups" do
737
- "1001".en.numwords( :group => 3 ).should == "one zero zero, one"
724
+ expect( "1001".en.numwords(group: 3) ).to eq( "one zero zero, one" )
738
725
  end
739
726
 
740
727
 
741
728
  it "can transform the english words for 1001 into an ordinal" do
742
- "1001".en.numwords.en.ordinal.should == "one thousand and first"
729
+ expect( "1001".en.numwords.en.ordinal ).to eq( "one thousand and first" )
743
730
  end
744
731
 
745
732
 
746
733
  it "can transform 1010 into english words" do
747
- "1010".en.numwords.should == "one thousand and ten"
734
+ expect( "1010".en.numwords ).to eq( "one thousand and ten" )
748
735
  end
749
736
 
750
737
  it "can transform 1010 into english words in single-digit groups" do
751
- "1010".en.numwords( :group => 1 ).should == "one, zero, one, zero"
738
+ expect( "1010".en.numwords(group: 1) ).to eq( "one, zero, one, zero" )
752
739
  end
753
740
 
754
741
  it "can transform 1010 into english words in double-digit groups" do
755
- "1010".en.numwords( :group => 2 ).should == "ten, ten"
742
+ expect( "1010".en.numwords(group: 2) ).to eq( "ten, ten" )
756
743
  end
757
744
 
758
745
  it "can transform 1010 into english words in triple-digit groups" do
759
- "1010".en.numwords( :group => 3 ).should == "one zero one, zero"
746
+ expect( "1010".en.numwords(group: 3) ).to eq( "one zero one, zero" )
760
747
  end
761
748
 
762
749
 
763
750
  it "can transform the english words for 1010 into an ordinal" do
764
- "1010".en.numwords.en.ordinal.should == "one thousand and tenth"
751
+ expect( "1010".en.numwords.en.ordinal ).to eq( "one thousand and tenth" )
765
752
  end
766
753
 
767
754
 
768
755
  it "can transform 1100 into english words" do
769
- "1100".en.numwords.should == "one thousand, one hundred"
756
+ expect( "1100".en.numwords ).to eq( "one thousand, one hundred" )
770
757
  end
771
758
 
772
759
  it "can transform 1100 into english words in single-digit groups" do
773
- "1100".en.numwords( :group => 1 ).should == "one, one, zero, zero"
760
+ expect( "1100".en.numwords(group: 1) ).to eq( "one, one, zero, zero" )
774
761
  end
775
762
 
776
763
  it "can transform 1100 into english words in double-digit groups" do
777
- "1100".en.numwords( :group => 2 ).should == "eleven, zero zero"
764
+ expect( "1100".en.numwords(group: 2) ).to eq( "eleven, zero zero" )
778
765
  end
779
766
 
780
767
  it "can transform 1100 into english words in triple-digit groups" do
781
- "1100".en.numwords( :group => 3 ).should == "one ten, zero"
768
+ expect( "1100".en.numwords(group: 3) ).to eq( "one ten, zero" )
782
769
  end
783
770
 
784
771
 
785
772
  it "can transform the english words for 1100 into an ordinal" do
786
- "1100".en.numwords.en.ordinal.should == "one thousand, one hundredth"
773
+ expect( "1100".en.numwords.en.ordinal ).to eq( "one thousand, one hundredth" )
787
774
  end
788
775
 
789
776
 
790
777
  it "can transform 2000 into english words" do
791
- "2000".en.numwords.should == "two thousand"
778
+ expect( "2000".en.numwords ).to eq( "two thousand" )
792
779
  end
793
780
 
794
781
  it "can transform 2000 into english words in single-digit groups" do
795
- "2000".en.numwords( :group => 1 ).should == "two, zero, zero, zero"
782
+ expect( "2000".en.numwords(group: 1) ).to eq( "two, zero, zero, zero" )
796
783
  end
797
784
 
798
785
  it "can transform 2000 into english words in double-digit groups" do
799
- "2000".en.numwords( :group => 2 ).should == "twenty, zero zero"
786
+ expect( "2000".en.numwords(group: 2) ).to eq( "twenty, zero zero" )
800
787
  end
801
788
 
802
789
  it "can transform 2000 into english words in triple-digit groups" do
803
- "2000".en.numwords( :group => 3 ).should == "two zero zero, zero"
790
+ expect( "2000".en.numwords(group: 3) ).to eq( "two zero zero, zero" )
804
791
  end
805
792
 
806
793
 
807
794
  it "can transform the english words for 2000 into an ordinal" do
808
- "2000".en.numwords.en.ordinal.should == "two thousandth"
795
+ expect( "2000".en.numwords.en.ordinal ).to eq( "two thousandth" )
809
796
  end
810
797
 
811
798
 
812
799
  it "can transform 10000 into english words" do
813
- "10000".en.numwords.should == "ten thousand"
800
+ expect( "10000".en.numwords ).to eq( "ten thousand" )
814
801
  end
815
802
 
816
803
  it "can transform 10000 into english words in single-digit groups" do
817
- "10000".en.numwords( :group => 1 ).should == "one, zero, zero, zero, zero"
804
+ expect( "10000".en.numwords(group: 1) ).to eq( "one, zero, zero, zero, zero" )
818
805
  end
819
806
 
820
807
  it "can transform 10000 into english words in double-digit groups" do
821
- "10000".en.numwords( :group => 2 ).should == "ten, zero zero, zero"
808
+ expect( "10000".en.numwords(group: 2) ).to eq( "ten, zero zero, zero" )
822
809
  end
823
810
 
824
811
  it "can transform 10000 into english words in triple-digit groups" do
825
- "10000".en.numwords( :group => 3 ).should == "one zero zero, zero zero"
812
+ expect( "10000".en.numwords(group: 3) ).to eq( "one zero zero, zero zero" )
826
813
  end
827
814
 
828
815
 
829
816
  it "can transform the english words for 10000 into an ordinal" do
830
- "10000".en.numwords.en.ordinal.should == "ten thousandth"
817
+ expect( "10000".en.numwords.en.ordinal ).to eq( "ten thousandth" )
831
818
  end
832
819
 
833
820
 
834
821
  it "can transform 100000 into english words" do
835
- "100000".en.numwords.should == "one hundred thousand"
822
+ expect( "100000".en.numwords ).to eq( "one hundred thousand" )
836
823
  end
837
824
 
838
825
  it "can transform 100000 into english words in single-digit groups" do
839
- "100000".en.numwords( :group => 1 ).should == "one, zero, zero, zero, zero, zero"
826
+ expect( "100000".en.numwords(group: 1) ).to eq( "one, zero, zero, zero, zero, zero" )
840
827
  end
841
828
 
842
829
  it "can transform 100000 into english words in double-digit groups" do
843
- "100000".en.numwords( :group => 2 ).should == "ten, zero zero, zero zero"
830
+ expect( "100000".en.numwords(group: 2) ).to eq( "ten, zero zero, zero zero" )
844
831
  end
845
832
 
846
833
  it "can transform 100000 into english words in triple-digit groups" do
847
- "100000".en.numwords( :group => 3 ).should == "one zero zero, zero zero zero"
834
+ expect( "100000".en.numwords(group: 3) ).to eq( "one zero zero, zero zero zero" )
848
835
  end
849
836
 
850
837
 
851
838
  it "can transform the english words for 100000 into an ordinal" do
852
- "100000".en.numwords.en.ordinal.should == "one hundred thousandth"
839
+ expect( "100000".en.numwords.en.ordinal ).to eq( "one hundred thousandth" )
853
840
  end
854
841
 
855
842
 
856
843
  it "can transform 100001 into english words" do
857
- "100001".en.numwords.should == "one hundred thousand and one"
844
+ expect( "100001".en.numwords ).to eq( "one hundred thousand and one" )
858
845
  end
859
846
 
860
847
  it "can transform 100001 into english words in single-digit groups" do
861
- "100001".en.numwords( :group => 1 ).should == "one, zero, zero, zero, zero, one"
848
+ expect( "100001".en.numwords(group: 1) ).to eq( "one, zero, zero, zero, zero, one" )
862
849
  end
863
850
 
864
851
  it "can transform 100001 into english words in double-digit groups" do
865
- "100001".en.numwords( :group => 2 ).should == "ten, zero zero, zero one"
852
+ expect( "100001".en.numwords(group: 2) ).to eq( "ten, zero zero, zero one" )
866
853
  end
867
854
 
868
855
  it "can transform 100001 into english words in triple-digit groups" do
869
- "100001".en.numwords( :group => 3 ).should == "one zero zero, zero zero one"
856
+ expect( "100001".en.numwords(group: 3) ).to eq( "one zero zero, zero zero one" )
870
857
  end
871
858
 
872
859
 
873
860
  it "can transform the english words for 100001 into an ordinal" do
874
- "100001".en.numwords.en.ordinal.should == "one hundred thousand and first"
861
+ expect( "100001".en.numwords.en.ordinal ).to eq( "one hundred thousand and first" )
875
862
  end
876
863
 
877
864
 
878
865
  it "can transform 123456 into english words" do
879
- "123456".en.numwords.should == "one hundred and twenty-three thousand, four hundred and fifty-six"
866
+ expect( "123456".en.numwords ).to eq( "one hundred and twenty-three thousand, four hundred and fifty-six" )
880
867
  end
881
868
 
882
869
  it "can transform 123456 into english words in single-digit groups" do
883
- "123456".en.numwords( :group => 1 ).should == "one, two, three, four, five, six"
870
+ expect( "123456".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six" )
884
871
  end
885
872
 
886
873
  it "can transform 123456 into english words in double-digit groups" do
887
- "123456".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six"
874
+ expect( "123456".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six" )
888
875
  end
889
876
 
890
877
  it "can transform 123456 into english words in triple-digit groups" do
891
- "123456".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six"
878
+ expect( "123456".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six" )
892
879
  end
893
880
 
894
881
 
895
882
  it "can transform the english words for 123456 into an ordinal" do
896
- "123456".en.numwords.en.ordinal.should == "one hundred and twenty-three thousand, four hundred and fifty-sixth"
883
+ expect( "123456".en.numwords.en.ordinal ).to eq( "one hundred and twenty-three thousand, four hundred and fifty-sixth" )
897
884
  end
898
885
 
899
886
 
900
887
  it "can transform 0123456 into english words" do
901
- "0123456".en.numwords.should == "one hundred and twenty-three thousand, four hundred and fifty-six"
888
+ expect( "0123456".en.numwords ).to eq( "one hundred and twenty-three thousand, four hundred and fifty-six" )
902
889
  end
903
890
 
904
891
  it "can transform 0123456 into english words in single-digit groups" do
905
- "0123456".en.numwords( :group => 1 ).should == "zero, one, two, three, four, five, six"
892
+ expect( "0123456".en.numwords(group: 1) ).to eq( "zero, one, two, three, four, five, six" )
906
893
  end
907
894
 
908
895
  it "can transform 0123456 into english words in double-digit groups" do
909
- "0123456".en.numwords( :group => 2 ).should == "zero one, twenty-three, forty-five, six"
896
+ expect( "0123456".en.numwords(group: 2) ).to eq( "zero one, twenty-three, forty-five, six" )
910
897
  end
911
898
 
912
899
  it "can transform 0123456 into english words in triple-digit groups" do
913
- "0123456".en.numwords( :group => 3 ).should == "zero twelve, three forty-five, six"
900
+ expect( "0123456".en.numwords(group: 3) ).to eq( "zero twelve, three forty-five, six" )
914
901
  end
915
902
 
916
903
 
917
904
  it "can transform the english words for 0123456 into an ordinal" do
918
- "0123456".en.numwords.en.ordinal.should == "one hundred and twenty-three thousand, four hundred and fifty-sixth"
905
+ expect( "0123456".en.numwords.en.ordinal ).to eq( "one hundred and twenty-three thousand, four hundred and fifty-sixth" )
919
906
  end
920
907
 
921
908
 
922
909
  it "can transform 1234567 into english words" do
923
- "1234567".en.numwords.should == "one million, two hundred and thirty-four thousand, five hundred and sixty-seven"
910
+ expect( "1234567".en.numwords ).to eq( "one million, two hundred and thirty-four thousand, five hundred and sixty-seven" )
924
911
  end
925
912
 
926
913
  it "can transform 1234567 into english words in single-digit groups" do
927
- "1234567".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven"
914
+ expect( "1234567".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven" )
928
915
  end
929
916
 
930
917
  it "can transform 1234567 into english words in double-digit groups" do
931
- "1234567".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seven"
918
+ expect( "1234567".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seven" )
932
919
  end
933
920
 
934
921
  it "can transform 1234567 into english words in triple-digit groups" do
935
- "1234567".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seven"
922
+ expect( "1234567".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seven" )
936
923
  end
937
924
 
938
925
 
939
926
  it "can transform the english words for 1234567 into an ordinal" do
940
- "1234567".en.numwords.en.ordinal.should == "one million, two hundred and thirty-four thousand, five hundred and sixty-seventh"
927
+ expect( "1234567".en.numwords.en.ordinal ).to eq( "one million, two hundred and thirty-four thousand, five hundred and sixty-seventh" )
941
928
  end
942
929
 
943
930
 
944
931
  it "can transform 12345678 into english words" do
945
- "12345678".en.numwords.should == "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight"
932
+ expect( "12345678".en.numwords ).to eq( "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight" )
946
933
  end
947
934
 
948
935
  it "can transform 12345678 into english words in single-digit groups" do
949
- "12345678".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight"
936
+ expect( "12345678".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight" )
950
937
  end
951
938
 
952
939
  it "can transform 12345678 into english words in double-digit groups" do
953
- "12345678".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight"
940
+ expect( "12345678".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight" )
954
941
  end
955
942
 
956
943
  it "can transform 12345678 into english words in triple-digit groups" do
957
- "12345678".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seventy-eight"
944
+ expect( "12345678".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seventy-eight" )
958
945
  end
959
946
 
960
947
 
961
948
  it "can transform the english words for 12345678 into an ordinal" do
962
- "12345678".en.numwords.en.ordinal.should == "twelve million, three hundred and forty-five thousand, six hundred and seventy-eighth"
949
+ expect( "12345678".en.numwords.en.ordinal ).to eq( "twelve million, three hundred and forty-five thousand, six hundred and seventy-eighth" )
963
950
  end
964
951
 
965
952
 
966
953
  it "can transform 12_345_678 into english words" do
967
- "12_345_678".en.numwords.should == "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight"
954
+ expect( "12_345_678".en.numwords ).to eq( "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight" )
968
955
  end
969
956
 
970
957
  it "can transform 12_345_678 into english words in single-digit groups" do
971
- "12_345_678".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight"
958
+ expect( "12_345_678".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight" )
972
959
  end
973
960
 
974
961
  it "can transform 12_345_678 into english words in double-digit groups" do
975
- "12_345_678".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight"
962
+ expect( "12_345_678".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight" )
976
963
  end
977
964
 
978
965
  it "can transform 12_345_678 into english words in triple-digit groups" do
979
- "12_345_678".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seventy-eight"
966
+ expect( "12_345_678".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seventy-eight" )
980
967
  end
981
968
 
982
969
 
983
970
  it "can transform 1234,5678 into english words" do
984
- "1234,5678".en.numwords.should == "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight"
971
+ expect( "1234,5678".en.numwords ).to eq( "twelve million, three hundred and forty-five thousand, six hundred and seventy-eight" )
985
972
  end
986
973
 
987
974
  it "can transform 1234,5678 into english words in single-digit groups" do
988
- "1234,5678".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight"
975
+ expect( "1234,5678".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight" )
989
976
  end
990
977
 
991
978
  it "can transform 1234,5678 into english words in double-digit groups" do
992
- "1234,5678".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight"
979
+ expect( "1234,5678".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight" )
993
980
  end
994
981
 
995
982
  it "can transform 1234,5678 into english words in triple-digit groups" do
996
- "1234,5678".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seventy-eight"
983
+ expect( "1234,5678".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seventy-eight" )
997
984
  end
998
985
 
999
986
 
1000
987
  it "can transform 1234567890 into english words" do
1001
- "1234567890".en.numwords.should == "one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety"
988
+ expect( "1234567890".en.numwords ).to eq( "one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety" )
1002
989
  end
1003
990
 
1004
991
  it "can transform 1234567890 into english words in single-digit groups" do
1005
- "1234567890".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight, nine, zero"
992
+ expect( "1234567890".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight, nine, zero" )
1006
993
  end
1007
994
 
1008
995
  it "can transform 1234567890 into english words in double-digit groups" do
1009
- "1234567890".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight, ninety"
996
+ expect( "1234567890".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight, ninety" )
1010
997
  end
1011
998
 
1012
999
  it "can transform 1234567890 into english words in triple-digit groups" do
1013
- "1234567890".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seven eighty-nine, zero"
1000
+ expect( "1234567890".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seven eighty-nine, zero" )
1014
1001
  end
1015
1002
 
1016
1003
 
1017
1004
  it "can transform the english words for 1234567890 into an ordinal" do
1018
- "1234567890".en.numwords.en.ordinal.should == "one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninetieth"
1005
+ expect( "1234567890".en.numwords.en.ordinal ).to eq( "one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninetieth" )
1019
1006
  end
1020
1007
 
1021
1008
 
1022
1009
  it "can transform 123456789012345 into english words" do
1023
- "123456789012345".en.numwords.should == "one hundred and twenty-three trillion, four hundred and fifty-six billion, seven hundred and eighty-nine million, twelve thousand, three hundred and forty-five"
1010
+ expect( "123456789012345".en.numwords ).to eq( "one hundred and twenty-three trillion, four hundred and fifty-six billion, seven hundred and eighty-nine million, twelve thousand, three hundred and forty-five" )
1024
1011
  end
1025
1012
 
1026
1013
  it "can transform 123456789012345 into english words in single-digit groups" do
1027
- "123456789012345".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight, nine, zero, one, two, three, four, five"
1014
+ expect( "123456789012345".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight, nine, zero, one, two, three, four, five" )
1028
1015
  end
1029
1016
 
1030
1017
  it "can transform 123456789012345 into english words in double-digit groups" do
1031
- "123456789012345".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight, ninety, twelve, thirty-four, five"
1018
+ expect( "123456789012345".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight, ninety, twelve, thirty-four, five" )
1032
1019
  end
1033
1020
 
1034
1021
  it "can transform 123456789012345 into english words in triple-digit groups" do
1035
- "123456789012345".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seven eighty-nine, zero twelve, three forty-five"
1022
+ expect( "123456789012345".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seven eighty-nine, zero twelve, three forty-five" )
1036
1023
  end
1037
1024
 
1038
1025
 
1039
1026
  it "can transform the english words for 123456789012345 into an ordinal" do
1040
- "123456789012345".en.numwords.en.ordinal.should == "one hundred and twenty-three trillion, four hundred and fifty-six billion, seven hundred and eighty-nine million, twelve thousand, three hundred and forty-fifth"
1027
+ expect( "123456789012345".en.numwords.en.ordinal ).to eq( "one hundred and twenty-three trillion, four hundred and fifty-six billion, seven hundred and eighty-nine million, twelve thousand, three hundred and forty-fifth" )
1041
1028
  end
1042
1029
 
1043
1030
 
1044
1031
  it "can transform 12345678901234567890 into english words" do
1045
- "12345678901234567890".en.numwords.should == "twelve quintillion, three hundred and forty-five quadrillion, six hundred and seventy-eight trillion, nine hundred and one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety"
1032
+ expect( "12345678901234567890".en.numwords ).to eq( "twelve quintillion, three hundred and forty-five quadrillion, six hundred and seventy-eight trillion, nine hundred and one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninety" )
1046
1033
  end
1047
1034
 
1048
1035
  it "can transform 12345678901234567890 into english words in single-digit groups" do
1049
- "12345678901234567890".en.numwords( :group => 1 ).should == "one, two, three, four, five, six, seven, eight, nine, zero, one, two, three, four, five, six, seven, eight, nine, zero"
1036
+ expect( "12345678901234567890".en.numwords(group: 1) ).to eq( "one, two, three, four, five, six, seven, eight, nine, zero, one, two, three, four, five, six, seven, eight, nine, zero" )
1050
1037
  end
1051
1038
 
1052
1039
  it "can transform 12345678901234567890 into english words in double-digit groups" do
1053
- "12345678901234567890".en.numwords( :group => 2 ).should == "twelve, thirty-four, fifty-six, seventy-eight, ninety, twelve, thirty-four, fifty-six, seventy-eight, ninety"
1040
+ expect( "12345678901234567890".en.numwords(group: 2) ).to eq( "twelve, thirty-four, fifty-six, seventy-eight, ninety, twelve, thirty-four, fifty-six, seventy-eight, ninety" )
1054
1041
  end
1055
1042
 
1056
1043
  it "can transform 12345678901234567890 into english words in triple-digit groups" do
1057
- "12345678901234567890".en.numwords( :group => 3 ).should == "one twenty-three, four fifty-six, seven eighty-nine, zero twelve, three forty-five, six seventy-eight, ninety"
1044
+ expect( "12345678901234567890".en.numwords(group: 3) ).to eq( "one twenty-three, four fifty-six, seven eighty-nine, zero twelve, three forty-five, six seventy-eight, ninety" )
1058
1045
  end
1059
1046
 
1060
1047
 
1061
1048
  it "can transform the english words for 12345678901234567890 into an ordinal" do
1062
- "12345678901234567890".en.numwords.en.ordinal.should == "twelve quintillion, three hundred and forty-five quadrillion, six hundred and seventy-eight trillion, nine hundred and one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninetieth"
1049
+ expect( "12345678901234567890".en.numwords.en.ordinal ).to eq( "twelve quintillion, three hundred and forty-five quadrillion, six hundred and seventy-eight trillion, nine hundred and one billion, two hundred and thirty-four million, five hundred and sixty-seven thousand, eight hundred and ninetieth" )
1063
1050
  end
1064
1051
 
1065
1052
 
1066
1053
  it "can transform 0.987654 into english words" do
1067
- "0.987654".en.numwords.should == "zero point nine eight seven six five four"
1054
+ expect( "0.987654".en.numwords ).to eq( "zero point nine eight seven six five four" )
1068
1055
  end
1069
1056
 
1070
1057
  it "can transform 0.987654 into english words in single-digit groups" do
1071
- "0.987654".en.numwords( :group => 1 ).should == "zero, point, nine, eight, seven, six, five, four"
1058
+ expect( "0.987654".en.numwords(group: 1) ).to eq( "zero, point, nine, eight, seven, six, five, four" )
1072
1059
  end
1073
1060
 
1074
1061
  it "can transform 0.987654 into english words in double-digit groups" do
1075
- "0.987654".en.numwords( :group => 2 ).should == "zero, point, ninety-eight, seventy-six, fifty-four"
1062
+ expect( "0.987654".en.numwords(group: 2) ).to eq( "zero, point, ninety-eight, seventy-six, fifty-four" )
1076
1063
  end
1077
1064
 
1078
1065
  it "can transform 0.987654 into english words in triple-digit groups" do
1079
- "0.987654".en.numwords( :group => 3 ).should == "zero, point, nine eighty-seven, six fifty-four"
1066
+ expect( "0.987654".en.numwords(group: 3) ).to eq( "zero, point, nine eighty-seven, six fifty-four" )
1080
1067
  end
1081
1068
 
1082
1069
 
1083
1070
  it "can transform the english words for 0.987654 into an ordinal" do
1084
- "0.987654".en.numwords.en.ordinal.should == "zero point nine eight seven six five fourth"
1071
+ expect( "0.987654".en.numwords.en.ordinal ).to eq( "zero point nine eight seven six five fourth" )
1085
1072
  end
1086
1073
 
1087
1074
 
1088
1075
  it "can transform .987654 into english words" do
1089
- ".987654".en.numwords.should == "point nine eight seven six five four"
1076
+ expect( ".987654".en.numwords ).to eq( "point nine eight seven six five four" )
1090
1077
  end
1091
1078
 
1092
1079
  it "can transform .987654 into english words in single-digit groups" do
1093
- ".987654".en.numwords( :group => 1 ).should == "point, nine, eight, seven, six, five, four"
1080
+ expect( ".987654".en.numwords(group: 1) ).to eq( "point, nine, eight, seven, six, five, four" )
1094
1081
  end
1095
1082
 
1096
1083
  it "can transform .987654 into english words in double-digit groups" do
1097
- ".987654".en.numwords( :group => 2 ).should == "point, ninety-eight, seventy-six, fifty-four"
1084
+ expect( ".987654".en.numwords(group: 2) ).to eq( "point, ninety-eight, seventy-six, fifty-four" )
1098
1085
  end
1099
1086
 
1100
1087
  it "can transform .987654 into english words in triple-digit groups" do
1101
- ".987654".en.numwords( :group => 3 ).should == "point, nine eighty-seven, six fifty-four"
1088
+ expect( ".987654".en.numwords(group: 3) ).to eq( "point, nine eighty-seven, six fifty-four" )
1102
1089
  end
1103
1090
 
1104
1091
 
1105
1092
  it "can transform the english words for .987654 into an ordinal" do
1106
- ".987654".en.numwords.en.ordinal.should == "point nine eight seven six five fourth"
1093
+ expect( ".987654".en.numwords.en.ordinal ).to eq( "point nine eight seven six five fourth" )
1107
1094
  end
1108
1095
 
1109
1096
 
1110
1097
  it "can transform 9.87654 into english words" do
1111
- "9.87654".en.numwords.should == "nine point eight seven six five four"
1098
+ expect( "9.87654".en.numwords ).to eq( "nine point eight seven six five four" )
1112
1099
  end
1113
1100
 
1114
1101
  it "can transform 9.87654 into english words in single-digit groups" do
1115
- "9.87654".en.numwords( :group => 1 ).should == "nine, point, eight, seven, six, five, four"
1102
+ expect( "9.87654".en.numwords(group: 1) ).to eq( "nine, point, eight, seven, six, five, four" )
1116
1103
  end
1117
1104
 
1118
1105
  it "can transform 9.87654 into english words in double-digit groups" do
1119
- "9.87654".en.numwords( :group => 2 ).should == "nine, point, eighty-seven, sixty-five, four"
1106
+ expect( "9.87654".en.numwords(group: 2) ).to eq( "nine, point, eighty-seven, sixty-five, four" )
1120
1107
  end
1121
1108
 
1122
1109
  it "can transform 9.87654 into english words in triple-digit groups" do
1123
- "9.87654".en.numwords( :group => 3 ).should == "nine, point, eight seventy-six, fifty-four"
1110
+ expect( "9.87654".en.numwords(group: 3) ).to eq( "nine, point, eight seventy-six, fifty-four" )
1124
1111
  end
1125
1112
 
1126
1113
 
1127
1114
  it "can transform the english words for 9.87654 into an ordinal" do
1128
- "9.87654".en.numwords.en.ordinal.should == "nine point eight seven six five fourth"
1115
+ expect( "9.87654".en.numwords.en.ordinal ).to eq( "nine point eight seven six five fourth" )
1129
1116
  end
1130
1117
 
1131
1118
 
1132
1119
  it "can transform 98.7654 into english words" do
1133
- "98.7654".en.numwords.should == "ninety-eight point seven six five four"
1120
+ expect( "98.7654".en.numwords ).to eq( "ninety-eight point seven six five four" )
1134
1121
  end
1135
1122
 
1136
1123
  it "can transform 98.7654 into english words in single-digit groups" do
1137
- "98.7654".en.numwords( :group => 1 ).should == "nine, eight, point, seven, six, five, four"
1124
+ expect( "98.7654".en.numwords(group: 1) ).to eq( "nine, eight, point, seven, six, five, four" )
1138
1125
  end
1139
1126
 
1140
1127
  it "can transform 98.7654 into english words in double-digit groups" do
1141
- "98.7654".en.numwords( :group => 2 ).should == "ninety-eight, point, seventy-six, fifty-four"
1128
+ expect( "98.7654".en.numwords(group: 2) ).to eq( "ninety-eight, point, seventy-six, fifty-four" )
1142
1129
  end
1143
1130
 
1144
1131
  it "can transform 98.7654 into english words in triple-digit groups" do
1145
- "98.7654".en.numwords( :group => 3 ).should == "ninety-eight, point, seven sixty-five, four"
1132
+ expect( "98.7654".en.numwords(group: 3) ).to eq( "ninety-eight, point, seven sixty-five, four" )
1146
1133
  end
1147
1134
 
1148
1135
 
1149
1136
  it "can transform the english words for 98.7654 into an ordinal" do
1150
- "98.7654".en.numwords.en.ordinal.should == "ninety-eight point seven six five fourth"
1137
+ expect( "98.7654".en.numwords.en.ordinal ).to eq( "ninety-eight point seven six five fourth" )
1151
1138
  end
1152
1139
 
1153
1140
 
1154
1141
  it "can transform 987.654 into english words" do
1155
- "987.654".en.numwords.should == "nine hundred and eighty-seven point six five four"
1142
+ expect( "987.654".en.numwords ).to eq( "nine hundred and eighty-seven point six five four" )
1156
1143
  end
1157
1144
 
1158
1145
  it "can transform 987.654 into english words in single-digit groups" do
1159
- "987.654".en.numwords( :group => 1 ).should == "nine, eight, seven, point, six, five, four"
1146
+ expect( "987.654".en.numwords(group: 1) ).to eq( "nine, eight, seven, point, six, five, four" )
1160
1147
  end
1161
1148
 
1162
1149
  it "can transform 987.654 into english words in double-digit groups" do
1163
- "987.654".en.numwords( :group => 2 ).should == "ninety-eight, seven, point, sixty-five, four"
1150
+ expect( "987.654".en.numwords(group: 2) ).to eq( "ninety-eight, seven, point, sixty-five, four" )
1164
1151
  end
1165
1152
 
1166
1153
  it "can transform 987.654 into english words in triple-digit groups" do
1167
- "987.654".en.numwords( :group => 3 ).should == "nine eighty-seven, point, six fifty-four"
1154
+ expect( "987.654".en.numwords(group: 3) ).to eq( "nine eighty-seven, point, six fifty-four" )
1168
1155
  end
1169
1156
 
1170
1157
 
1171
1158
  it "can transform the english words for 987.654 into an ordinal" do
1172
- "987.654".en.numwords.en.ordinal.should == "nine hundred and eighty-seven point six five fourth"
1159
+ expect( "987.654".en.numwords.en.ordinal ).to eq( "nine hundred and eighty-seven point six five fourth" )
1173
1160
  end
1174
1161
 
1175
1162
 
1176
1163
  it "can transform 9876.54 into english words" do
1177
- "9876.54".en.numwords.should == "nine thousand, eight hundred and seventy-six point five four"
1164
+ expect( "9876.54".en.numwords ).to eq( "nine thousand, eight hundred and seventy-six point five four" )
1178
1165
  end
1179
1166
 
1180
1167
  it "can transform 9876.54 into english words in single-digit groups" do
1181
- "9876.54".en.numwords( :group => 1 ).should == "nine, eight, seven, six, point, five, four"
1168
+ expect( "9876.54".en.numwords(group: 1) ).to eq( "nine, eight, seven, six, point, five, four" )
1182
1169
  end
1183
1170
 
1184
1171
  it "can transform 9876.54 into english words in double-digit groups" do
1185
- "9876.54".en.numwords( :group => 2 ).should == "ninety-eight, seventy-six, point, fifty-four"
1172
+ expect( "9876.54".en.numwords(group: 2) ).to eq( "ninety-eight, seventy-six, point, fifty-four" )
1186
1173
  end
1187
1174
 
1188
1175
  it "can transform 9876.54 into english words in triple-digit groups" do
1189
- "9876.54".en.numwords( :group => 3 ).should == "nine eighty-seven, six, point, fifty-four"
1176
+ expect( "9876.54".en.numwords(group: 3) ).to eq( "nine eighty-seven, six, point, fifty-four" )
1190
1177
  end
1191
1178
 
1192
1179
 
1193
1180
  it "can transform the english words for 9876.54 into an ordinal" do
1194
- "9876.54".en.numwords.en.ordinal.should == "nine thousand, eight hundred and seventy-six point five fourth"
1181
+ expect( "9876.54".en.numwords.en.ordinal ).to eq( "nine thousand, eight hundred and seventy-six point five fourth" )
1195
1182
  end
1196
1183
 
1197
1184
 
1198
1185
  it "can transform 98765.4 into english words" do
1199
- "98765.4".en.numwords.should == "ninety-eight thousand, seven hundred and sixty-five point four"
1186
+ expect( "98765.4".en.numwords ).to eq( "ninety-eight thousand, seven hundred and sixty-five point four" )
1200
1187
  end
1201
1188
 
1202
1189
  it "can transform 98765.4 into english words in single-digit groups" do
1203
- "98765.4".en.numwords( :group => 1 ).should == "nine, eight, seven, six, five, point, four"
1190
+ expect( "98765.4".en.numwords(group: 1) ).to eq( "nine, eight, seven, six, five, point, four" )
1204
1191
  end
1205
1192
 
1206
1193
  it "can transform 98765.4 into english words in double-digit groups" do
1207
- "98765.4".en.numwords( :group => 2 ).should == "ninety-eight, seventy-six, five, point, four"
1194
+ expect( "98765.4".en.numwords(group: 2) ).to eq( "ninety-eight, seventy-six, five, point, four" )
1208
1195
  end
1209
1196
 
1210
1197
  it "can transform 98765.4 into english words in triple-digit groups" do
1211
- "98765.4".en.numwords( :group => 3 ).should == "nine eighty-seven, sixty-five, point, four"
1198
+ expect( "98765.4".en.numwords(group: 3) ).to eq( "nine eighty-seven, sixty-five, point, four" )
1212
1199
  end
1213
1200
 
1214
1201
 
1215
1202
  it "can transform the english words for 98765.4 into an ordinal" do
1216
- "98765.4".en.numwords.en.ordinal.should == "ninety-eight thousand, seven hundred and sixty-five point fourth"
1203
+ expect( "98765.4".en.numwords.en.ordinal ).to eq( "ninety-eight thousand, seven hundred and sixty-five point fourth" )
1217
1204
  end
1218
1205
 
1219
1206
 
1220
1207
  it "can transform 101.202.303 into english words" do
1221
- "101.202.303".en.numwords.should == "one hundred and one point two zero two three zero three"
1208
+ expect( "101.202.303".en.numwords ).to eq( "one hundred and one point two zero two three zero three" )
1222
1209
  end
1223
1210
 
1224
1211
  it "can transform 101.202.303 into english words in single-digit groups" do
1225
- "101.202.303".en.numwords( :group => 1 ).should == "one, zero, one, point, two, zero, two, point, three, zero, three"
1212
+ expect( "101.202.303".en.numwords(group: 1) ).to eq( "one, zero, one, point, two, zero, two, point, three, zero, three" )
1226
1213
  end
1227
1214
 
1228
1215
  it "can transform 101.202.303 into english words in double-digit groups" do
1229
- "101.202.303".en.numwords( :group => 2 ).should == "ten, one, point, twenty, two, point, thirty, three"
1216
+ expect( "101.202.303".en.numwords(group: 2) ).to eq( "ten, one, point, twenty, two, point, thirty, three" )
1230
1217
  end
1231
1218
 
1232
1219
  it "can transform 101.202.303 into english words in triple-digit groups" do
1233
- "101.202.303".en.numwords( :group => 3 ).should == "one zero one, point, two zero two, point, three zero three"
1220
+ expect( "101.202.303".en.numwords(group: 3) ).to eq( "one zero one, point, two zero two, point, three zero three" )
1234
1221
  end
1235
1222
  end
1236
1223
 
1237
1224
 
1238
1225
  describe "quantification" do
1239
1226
  it "quantifies 0 objects as 'no'" do
1240
- "driver".en.quantify( 0 ).should == 'no drivers'
1227
+ expect( "driver".en.quantify( 0 ) ).to eq( 'no drivers' )
1241
1228
  end
1242
1229
 
1243
1230
  it "quantifies 1 object as 'a'" do
1244
- "driver".en.quantify( 1 ).should == 'a driver'
1231
+ expect( "driver".en.quantify( 1 ) ).to eq( 'a driver' )
1245
1232
  end
1246
1233
 
1247
1234
  it "quantifies 1 object that starts with a vowel sound as 'an'" do
1248
- "hour".en.quantify( 1 ).should == 'an hour'
1235
+ expect( "hour".en.quantify( 1 ) ).to eq( 'an hour' )
1249
1236
  end
1250
1237
 
1251
1238
  it "quantifies 2-5 objects as 'several'" do
1252
- "driver".en.quantify( 4 ).should == 'several drivers'
1239
+ expect( "driver".en.quantify( 4 ) ).to eq( 'several drivers' )
1253
1240
  end
1254
1241
 
1255
1242
  it "quantifies 6-19 objects as 'a number of'" do
1256
- "driver".en.quantify( 11 ).should == 'a number of drivers'
1243
+ expect( "driver".en.quantify( 11 ) ).to eq( 'a number of drivers' )
1257
1244
  end
1258
1245
 
1259
1246
  it "quantifies 20-45 objects as 'numerous'" do
1260
- "driver".en.quantify( 41 ).should == 'numerous drivers'
1247
+ expect( "driver".en.quantify( 41 ) ).to eq( 'numerous drivers' )
1261
1248
  end
1262
1249
 
1263
1250
  it "quantifies 46-99 objects as 'many'" do
1264
- "driver".en.quantify( 58 ).should == 'many drivers'
1251
+ expect( "driver".en.quantify( 58 ) ).to eq( 'many drivers' )
1265
1252
  end
1266
1253
 
1267
1254
  it "quantifies 100-999 objects as 'hundreds of'" do
1268
- "driver".en.quantify( 318 ).should == 'hundreds of drivers'
1255
+ expect( "driver".en.quantify( 318 ) ).to eq( 'hundreds of drivers' )
1269
1256
  end
1270
1257
 
1271
1258
  it "quantifies 1000-9999 objects as 'thousands of'" do
1272
- "driver".en.quantify( 4158 ).should == 'thousands of drivers'
1259
+ expect( "driver".en.quantify( 4158 ) ).to eq( 'thousands of drivers' )
1273
1260
  end
1274
1261
 
1275
1262
  it "quantifies 10000-99999 objects as 'tens of thousands of'" do
1276
- "driver".en.quantify( 14158 ).should == 'tens of thousands of drivers'
1263
+ expect( "driver".en.quantify( 14158 ) ).to eq( 'tens of thousands of drivers' )
1277
1264
  end
1278
1265
 
1279
1266
  it "quantifies 100000-999999 objects as 'hundreds of thousands of'" do
1280
- "driver".en.quantify( 614158 ).should == 'hundreds of thousands of drivers'
1267
+ expect( "driver".en.quantify( 614158 ) ).to eq( 'hundreds of thousands of drivers' )
1281
1268
  end
1282
1269
 
1283
1270
  it "quantifies 2.6M objects as 'millions of'" do
1284
- "driver".en.quantify( 2614158 ).should == 'millions of drivers'
1271
+ expect( "driver".en.quantify( 2614158 ) ).to eq( 'millions of drivers' )
1285
1272
  end
1286
1273
 
1287
1274
  it "quantifies 8.122B objects as 'billions of'" do
1288
- "driver".en.quantify( 8122614158 ).should == 'billions of drivers'
1275
+ expect( "driver".en.quantify( 8122614158 ) ).to eq( 'billions of drivers' )
1289
1276
  end
1290
1277
 
1291
1278