Ad
  • Custom User Avatar

    Ruby fork which resolves the issues regarding the outdated test checking functions (regex and description fix will come out later, I hope)

  • Custom User Avatar

    obviously I have no way of enforcing this

    This is not an excuse. The rule should either be enforced or removed.

  • Custom User Avatar
    • don't use Test.expect, use assert_equals instead... :(
    • needs random tests
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Description is horribly inadequate and the use of Test.expect is just horrible.

    Like, what do you expect us to return for 999? Are we going to have to guess to just know what the spec you have in mind?

    (Or the existing of stuff like a quintillion)

  • Custom User Avatar

    I think the conditions are not that clear... "The string can have any content and any length but must have zero or more blanks followed by zero to eight numeric digits followed by, again, zero or more blanks to be valid."
    So "Hey boy 1234 " is a valid string... and no top solution will give it as valid.
    You have to say as craecke notes that the string to be valid must have and only have zero or more blanks followed by zero to eight numeric digits followed by, again, zero or more blanks to be valid and in that case the kata is trivial.
    Furthermore "Value is not what was expected" is rather terse!

  • Custom User Avatar

    The explanation of this kata needs some work. The description, "it must have zero or more blanks followed by zero to eight numeric digits followed by, again, zero or more blanks," applies not only to every example given, including those marked as invalid, but I think it applies to every possible string. I think you meant to say that not only does the string need to have a part that fits that description, but it's not allowed to have anything else in it in addition to that. Also, you do have ways of enforcing your extra challenges: you can prevent people from using regular expressions as well as the each and map methods by writing "preloaded" code. I don't think you can prevent them from using while loops, though.