Ad
  • Custom User Avatar
    • missing edge case: 'A'.repeat(200)
    • the behavior for more than 2 rainbows isn't specified. If the case can never occur, it should be told in the description.
  • Custom User Avatar

    markdowns formatting are broken in the description

  • Custom User Avatar

    Save yourself a lot of work. Look into Test.randomize on this page (it's under Utilities, towards the bottom).

    Reinventing the wheel has given us too many square wheels already.

  • Custom User Avatar

    Example tests:

    Test.assertEquals(WillThereEverBeARainbow('REDORANGEYELLOWGREENBLUEINDIGOVIOLET'), 'Oh, Tyrant! Hear his mighty name and quake!');
    Test.assertEquals(WillThereEverBeARainbow('EONEWOEEVNDYTEBIGNUOELRLOEDGGAIRRL'), 'Oh, Tyrant! Hear his mighty name and quake!');
    Test.assertEquals(WillThereEverBeARainbow('YBWDDVEEEEEEEUGGGTIIRRRLLLOOOONNN'), "Smithers, I am not going to make it...");
    

    The second test expects true (well, your version of it), however, the given string is shorter than the seven colours together. That is never going to work.

    Apparently, that test is also used in the Submit tests, so

    • the tests are wrong
    • the kata is currently unsolvable
    • except of course for cheating your way through it, which is possible because there are no random tests

    Please do better.

  • Custom User Avatar

    Your instructions say

    If the string does not contain the necessary letters, return "Smithers, I'm not going to make it..."
    

    but the test cases want

    "Smithers, I am not going to make it..."