Your examples in the "input" section appear to be from the JavasScript version of this kata (given the use of var) and would lead someone to believe you are using symbols as your keys. For example: { firstName: 'Nikau', lastName: 'R.', country: 'New Zealand', continent: 'Oceania', age: 39, language: 'Ruby' }
In case you are not familiar with this style of litereal hash formatting, this is the same as: { :firstName => 'Nikau', :lastName => 'R.', :country => 'New Zealand', :continent => 'Oceania', :age => 39, :language => 'Ruby' }
However your test cases use String keys and snake case for the keys. Example: { "first_name" => "Nikau", "last_name" => 'R.', "country" => "New Zealand", "continent" => "Oceania", "age" => 39, "language" => "Ruby" }
If you were not intending on having the kata practice handling both Symbol and String keys (as well as the different cases) then you should update the input to follow the expected keys. The description says that the test cases will follow exactly the form shown.
The Ruby tests for decode are wrong. They don't look for the decoded message just the array turned into a string minus the first two characters.
Your examples in the "input" section appear to be from the JavasScript version of this kata (given the use of
var
) and would lead someone to believe you are using symbols as your keys. For example:{ firstName: 'Nikau', lastName: 'R.', country: 'New Zealand', continent: 'Oceania', age: 39, language: 'Ruby' }
In case you are not familiar with this style of litereal hash formatting, this is the same as:
{ :firstName => 'Nikau', :lastName => 'R.', :country => 'New Zealand', :continent => 'Oceania', :age => 39, :language => 'Ruby' }
However your test cases use
String
keys and snake case for the keys. Example:{ "first_name" => "Nikau", "last_name" => 'R.', "country" => "New Zealand", "continent" => "Oceania", "age" => 39, "language" => "Ruby" }
If you were not intending on having the kata practice handling both
Symbol
andString
keys (as well as the different cases) then you should update the input to follow the expected keys. The description says that the test cases will follow exactly the form shown.They do not look at all as symbols to me, as symbols are with a leading, not trailing colon.
keys are shown as symbols in the instuctions but are string in the ruby solution.