Ad
  • Custom User Avatar

    description says: "Date parameter could be a string or a Date object."

  • Custom User Avatar

    description says: "Date parameter could be a string or a Date object."

  • Custom User Avatar

    For all those who get an error 'NoMethodError...' please note that kata description says: "Date parameter could be a string or a Date object." Good luck.

  • Custom User Avatar

    Hi LogaJ, you shouldn't make any assumptions, because kata description clearly states: "Date parameter could be a string or a Date object."

  • Custom User Avatar

    I believe the specs have something wrong ... Can't understand why my codes failed!!!

  • Custom User Avatar

    It looks like your code is minipulating the original instances and changing their values around, which was causing the specs to act weird. I've updated the kata to include an initial test case example, so that you can see how the tests are setup.

  • Custom User Avatar

    Wow, my long winded solution is so unnessary! As soon as I saw this it was so obvious!

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    This is strange. The tests seem to be OK but that error message definitely is not correct. Would you mind adding your solution here and marking it as a spoiler?

  • Custom User Avatar

    Something weird is going on. Using the example expected output in my unsubmitted test cases passes, but when I submit my final answer I get the following error:

    Test::Error: Expected: [{:id=>2}, {:id=>1}], instead got: [{:id=>1}, {:id=>2}]

    The expectation is incorrect, the expectatition should read:
    [{:id=>1}, {:id=>2}] and rather than [{:id=>2}, {:id=>1}]