Ad
  • Custom User Avatar

    So I think it's something with CodeWars because I 'reset' the Kata and all my code was still there. Then when I attempted it, not even the TDD would show in the left-hand console. I said screw it and submitted my code and I passed.

  • Custom User Avatar

    I'm not sure why it's not working... I tried both example strings in my VSCode and they are returning correctly. As for my 'puts' statement, I had this:

    def to_camel_case(str)
    pp str
    end

    Usually in other Kata it will print it...I'm not sure what I'm doing wrong. Does it have something to do with the TDD? I'm just surprised that when I put in my current solution with a return statement, nothing gets returned, not even an error saying it was wrong. Just the TDD shows. Apologies if I am missing something.

  • Custom User Avatar

    There are no sample tests in Ruby

  • Custom User Avatar

    Sample tests for Ruby version of this kata are not provided :( Unfortunately, there are no example tests and you'd have to add them by yourself., for example like this:

    describe "Solution" do
      it "should test for something" do
        Test.assert_equals(to_camel_case(""), "")
        Test.assert_equals(to_camel_case("the-stealth-warrior"), "theStealthWarrior")
        Test.assert_equals(to_camel_case("The_Stealth_Warrior"), "theStealthWarrior")
      end
    end
    

    However full test suite seems to run correctly, and I get values printed with this code:

    def to_camel_case(str)
      print str
      ""
    end
    

    So if you get nothing printed on full attempt, you probably are doing something wrong.

  • Custom User Avatar

    For some reason none of my code is running...at all. Using Ruby and it won't even print any of my puts statements. Is this part of the challenge or something going on with this Kata/CodeWars site?