In this test we convert numbers to words or group of words whose min length is 3
Install ruby using RVM
-
Store all mappings and reverse mappings in yml file
-
Store dictionary as hash index in index_dict.yml file
-
Retrieve data from stored yml files for conversion
- Make mapping and reverse mapping yml file
ruby mapping.rb
- Make a index dictionary yml file
ruby index_dict.rb
-
Convert numbers to words
a. Default with given inputs
ruby conversion.rb
b. With external arguments
ruby conversion.rb 6626262589 8258252437
-
Test cases are written in Minitest
ruby conversion_test.rb