Ad
  • Custom User Avatar

    This is how the short tests appear for me:

    describe "Basic Tests" do
      it "should return unique integer(s) or a string" do
        expect(lottery("wQ8Hy0y5m5oshQPeRCkG")).to eq "805"
        expect(lottery("ffaQtaRFKeGIIBIcSJtg")).to eq "One more run!"
      end
    end
    

    And yes, now it works like a charm on my side, too!

  • Custom User Avatar

    Do you remember if the short tests looked something like this?

    Test.assert_equals(lottery("wQ8Hy0y5m5oshQPeRCkG"), "805", "should return unique integer(s) or a string")
    Test.assert_equals(lottery("ffaQtaRFKeGIIBIcSJtg"),"One more run!", "should return unique integer(s) or a string")
    

    I suspect what you saw was the sample tests from an older Ruby fork, which may not have refreshed after a fork update, if you have previously accessed the trainer.


    I see that you have submitted a working solution, so the tests should be updated now (as shown by hobovsky).

    Can you try running your solution again on the short tests to see if it works now?

  • Custom User Avatar

    I tried and still, cannot reproduce. Currently, the sample tests I see look like this:

    describe "Basic Tests" do
      it "should return unique integer(s) or a string" do
        expect(lottery("wQ8Hy0y5m5oshQPeRCkG")).to eq "805"
        expect(lottery("ffaQtaRFKeGIIBIcSJtg")).to eq "One more run!"
      end
    end
    

    If they look any different to you, hit RESET (back up your solution first!) and see if they get restored to the form above.

  • Custom User Avatar

    Yes, there are 2 sample tests IIRR. And as soon as you pass those the error message appears that I posted. Just try it out yourself and you will understand what I mean.

  • Custom User Avatar

    are you sure ? I can see sample tests just fine in Ruby. perhaps save your code somewhere and hit RESET ? you may have deleted them by mistake, or there was a glitch due to a recent fork (i see one Ruby fork approved 8 days ago that upgraded to Ruby 3.0)

  • Custom User Avatar

    Issue with the Ruby short tests:

    Time: 994ms Exit Code: 1
    Test Results:
    Log
    No examples found.

  • Custom User Avatar

    Simply rely on the JS's builtin lexicographic comparison of strings, where uppercase are considered less than lowercase. But you're right that the description could make this explicit.

  • Custom User Avatar

    if we need to sort the channels in an alphabetical order, than we do not need sort it bind ASCII, but bind to alphabetical
    Than Error message is wrong:

    Expected: { '0': 'BBC Sport',
    '1': 'BBC1',
    '2': 'CNBC',
    '3': 'Channel 4',
    '4': 'Discovery',
    '5': 'Drama',
    '6': 'Film 4',
    '7': 'Film 5',
    '8': 'Food Network',
    '9': 'National Geographic',
    '10': 'Sky Sport',
    '11': 'SyFy' }, instead got: { '0': 'BBC Sport',
    '1': 'BBC1',
    '2': 'Channel 4',
    '3': 'CNBC',
    '4': 'Discovery',
    '5': 'Drama',
    '6': 'Film 4',
    '7': 'Film 5',
    '8': 'Food Network',
    '9': 'National Geographic',
    '10': 'Sky Sport',
    '11': 'SyFy' }

    Because, char 'h' have to stay first before char 'N' in an alphabetical order

  • Custom User Avatar

    Java Translation kumited. Please check out, thank you! :)

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Julia sample tests:

    @fact lottery("555") --> '5'

    '5' should be "5"

  • Custom User Avatar

    Approved

  • Custom User Avatar

    Node.js needs an update.. It's still using version 8..

  • Custom User Avatar

    Approved

  • Loading more items...