Ad
  • Custom User Avatar

    Ruby 3.0 should be enabled, read this to learn how to do it

    Please organize the structure of test fixture as following (although it has been mentioned in the attached link, I'm repeated here again)

    describe "<This message should describe the categories of test groups inside this block>" do
      it "<A short message describing this test group>" do
        expect(...).to eq(...) #Assertions
        #Or Test.assert_equals(user_response, reference_response)
      end
    end
    
  • Custom User Avatar

    random tests of the form [x], n where n>0 are expecting [] instead of [x]. This contradicts one of the sample tests and the description of the kata. Python

  • Custom User Avatar

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

  • Default User Avatar

    Hi,

    Nice one. Some suggestions:

    • it lacks a test with an array of length 1
    • it lacks a test with n very large compared to the length of the original array too (let's say... Kata.splitAndAdd(new int[]{1,2,3,4,5},20))
    • it lacks a tests with n = 0 too.
    • in the ranndom tests, no need to limit the minimal length of the array between 3 and 102: you could use r.nextInt(100)+1 to be able to generate an array of length one.
    • would be nice to have a test with an small array of even length in the sample tests too

    cheers!