Ad
  • Custom User Avatar

    Approved

  • Custom User Avatar

    python new test framework is required. updated in this fork

  • Default User Avatar

    JS: Node v12 should be used along with its appropiate assertion tools (Mocha + Chai).
    Refer to this and this

  • Default User Avatar

    JS: Should have more sample tests

  • Default User Avatar

    Nice kata. Had to make several attempts at cracking this one, but got there in the end with a unelegant solution

  • Default User Avatar

    changed

  • Default User Avatar
  • Custom User Avatar

    thank you kata sensei for comprehensive instructions.

  • Default User Avatar

    A minor typo in the description: The function should insert only after the first occur[R]ence ..

  • Custom User Avatar

    Looking at the tests I can tell that everything seems fine to me (especially when viewing tests requires completing the kata). So, I'm tempted to say that it's your code that isn't working correctly.

  • Custom User Avatar

    Deleted the red dot as suggested and now sample test passes. But Attempt fails on 1 basic test and 1 random test. I don't believe either failure has to do with my code, since both errors mention the each_char method and the random test error mentions the times method. I used neither of those methods in my solution.

    For the basic test failure:

    #<ArgumentError: bad value for range>
    main.rb:12:in `block in insert_missing_letters'
    main.rb:9:in `each_char'
    main.rb:9:in `insert_missing_letters'
    main.rb:36:in `block (2 levels) in <main>'
    /runner/frameworks/ruby/cw-2.rb:180:in `wrap_error'
    /runner/frameworks/ruby/cw-2.rb:72:in `it'
    /runner/frameworks/ruby/cw-2.rb:206:in `it'
    main.rb:34:in `block in <main>'
    /runner/frameworks/ruby/cw-2.rb:55:in `block in describe'
    /runner/frameworks/ruby/cw-2.rb:46:in `measure'
    /runner/frameworks/ruby/cw-2.rb:51:in `describe'
    /runner/frameworks/ruby/cw-2.rb:202:in `describe'
    main.rb:33:in `<main>'
    

    For the random test failure:

    #<ArgumentError: bad value for range>
    main.rb:12:in `block in insert_missing_letters'
    main.rb:9:in `each_char'
    main.rb:9:in `insert_missing_letters'
    main.rb:52:in `block (3 levels) in <main>'
    main.rb:46:in `times'
    main.rb:46:in `block (2 levels) in <main>'
    /runner/frameworks/ruby/cw-2.rb:180:in `wrap_error'
    /runner/frameworks/ruby/cw-2.rb:72:in `it'
    /runner/frameworks/ruby/cw-2.rb:206:in `it'
    main.rb:43:in `block in <main>'
    /runner/frameworks/ruby/cw-2.rb:55:in `block in describe'
    /runner/frameworks/ruby/cw-2.rb:46:in `measure'
    /runner/frameworks/ruby/cw-2.rb:51:in `describe'
    /runner/frameworks/ruby/cw-2.rb:202:in `describe'
    main.rb:33:in `<main>'
    
  • Custom User Avatar

    @mmanousos, click Attempt instead, or delete the red dot after the sample test and try again.

  • Custom User Avatar

    Mistake in sample tests in Ruby:

    Test.assert_equals(insert_missing_letters("hello"),"hIJKMNPQRSTUVWXYZeFGIJKMNPQRSTUVWXYZlMNPQRSTUVWXYZloPQRSTUVWXYZ")​    <--    unknown character after closing parenthesis
                                                                                                                                   (it's not being displayed here for some reason)
    
  • Custom User Avatar

    There's a mistake in sample tests.

  • Custom User Avatar

    Yes, I'm sure. My script runs on my system. I wrote it in my code editor then copied and pasted here. It is only 15 lines long, and includes all necessary closing end commands. So I'm not sure why they would register an error on line 20.

  • Loading more items...