• Ruby 3.0 should be enabled, see 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
    
  • Ruby 3.0 should be enabled, see 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
    
  • Ruby 3.0 should be enabled, see 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
    
  • Ruby 3.0 should be enabled.

  • Python translation please check and aprove. Thank you

  • Closing the question. Feel free to reply if something still isn't clear.

  • got it thanks

  • lol i guess so, divisible is what i meant by multiples and still doesn't make sense but i'll bookmark for later

  • i'm familiar with regular fizz buzz.

    Maybe not familiar enough :P

    the way the problem reads to me is that multiples of 2 are "Fizz", multiples of 3 are "Buzz", multiples of both are "FizzBuzz".

    Why 2 and why 3 ? They're not static numbers, and your task is to find out what they are.

    [1, "Fizz", "Buzz", "Fizz", 5, "FizzBuzz"] ==> [2, 3]

    The answer should read as: elements divisible by 2 are 'Fizz' and elements divisible by 3 are 'Buzz', and divisible by both are 'FizzBuzz', giving the initial input.

  • i'm familiar with regular fizz buzz.

    it doesn't make sense to me why in [1, "Fizz", "Buzz", "Fizz", 5, "FizzBuzz"] ==> [2, 3], 2 is "Fizz", while in the next example given, [1, "FizzBuzz", 3, "FizzBuzz", 5, "FizzBuzz"] ==> [2, 2], 2 is FizzBuzz.

    the way the problem reads to me is that multiples of 2 are "Fizz", multiples of 3 are "Buzz", multiples of both are "FizzBuzz".

    may someone please clarify?

  • approved after 2 years :)

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

  • Hi,

    Indeed, it turned out that my code accidentaly mutated the input array - thanks a lot for this hint!

  • Hi,

    don't forget to tell about the language, when you post an issue.
    => JS.

    Issue confirmed, but that's not the ref solution that is wrong: I bet you're mutating the input array? => don't do that.


    actual issue: tests aren't protected against mutation of the input

  • Loading more items...