Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
"Take 2 strings s1 and s2 including only letters from a to z."
"Take 2 strings s1 and s2 including only letters from a to z." It's defined in the instructions, so the tests are complete.
"but still this solution seems to be correct, because task guarantees that only letters will be passed in. solution does not have to check for non-letters."
That is fair I suppose.
I thought a solution had to be correct to be posted here?
This is incorrect. It does not test for non-leters.
As others have pointed out, the assertions are broken. You can either fix it by running
abs/1
on the difference between expected and actual, or, better yet, ditch your home made assertion and use ExUnit'sassert_in_delta
.This comment is hidden because it contains spoiler information about the solution
.
Ruby methods are idiomatically snake case. Rename method
str_count
.This comment is hidden because it contains spoiler information about the solution
This issue hasn't been resolved. The Elixir version should be bumped to something 1.4.x, and the tests should all expect strings. Can we ping @jhoffner, who is sensei for the kata? How do I get involved fixing it?
Ruby version of Create Phone Number is not idiomatic. Method names should be underscored, not camelCased.