Ad
  • Custom User Avatar
    • No random tests in Ruby

    • Ruby 3.0 should be enabled

  • Default User Avatar

    There should be more random tests for odd number of digits to avoid solutions like this.

  • Default User Avatar

    Javascript:

    Couple of conditions mentioned in the description are not checked in the test cases

    1. no test checks for a 0 length string - description says should throw an error
    2. no test checks for an illegal character at the mid point in a string with an odd number of characters - description strongly implies this should throw an error
  • Custom User Avatar
  • Custom User Avatar

    Hey, @SandaySalsa! Description and Ruby test cases aren't clear! Or this kata like puzzle, guess what should be: luck_check('6F43E8') == false or luck_check('6F43E8') == 'Error' or end of program :) And luck_check('') in test cases will be an error.

    Yours sincerely,
    FridayBachata

  • Custom User Avatar

    (Ruby) cannot pass the invalid string input tests (only for submit, test button works). If I return 'error' or false, I still get: "The function somehow worked with wrong input"

    "6F43E8"
    "Error"
    The function somehow worked with wrong input
    "1234 "
    "Error"
    The function somehow worked with wrong input
    ""
    "Error"
    The function somehow worked with wrong input

  • Default User Avatar

    Pretty sure the test cases are broken. Once you get to random testing, the tests expects you to return false on invalid input instead of throwing an error.
    Also the description should probably be more detailed about dropping the center character on input with odd length.

  • Custom User Avatar

    It's strange but tests work differently when I click 'Run test' and 'Submit'.
    I had my tests failed with incorrect argument when I use raise unless ... but same tests had passed when I click 'Submit'!

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution