Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Look at the Notes section point 2, I clearly mention that there will be a clear winner or all have the same.
How so? I tested using the assert_equals vs expect and the message is the same
Also, the category of this kata is "bugfix", however, you're not fixing a bug, you're really implementing a new feature. Why don't you remove the default implementation and allow the practitioner to code up their own solution? Also, providing a code example as part of the test fixture would be nice.
Thanks for the suggestions, I've modified the kata such that if a test fails, they receive a message stating what scenario their code failed on.
I modified the kata such that it now generates a random name for each student (also making sure that the names are still unique). Thanks to the both of you for the advice.
I understand, but I'm not sure what to put for the message. I can't quite say "Expected answer, but got wrongAnswer instead". If you have a suggestion I'm all ears, but otherwise, I'm not sure what I can do on my end.
Yes, that would give you the names, but you would still have to figure out how much money each student had. It'd be different if the first student passed into the solution set was always the answer, but that's not true.
What you're proposing is that I create a series of "random" unit tests to run on the solution. To me, that's against the spirit of Code Wars. If a solution is submitted, it should be ran against the exact same series of tests.
Excellent point, I added a new line saying that if there is only a single student, then they have the most money.
But how would the end user know that Eric or Andy were even names of students? Your solution pre-supposes that they know all student names.
Thanks for the heads up about test fixture, I went ahead and solved that issue. I'm a bit confused on your comment about "randomness" of the tests, could explain a bit more?
Your test cases are good, but your test cases don't cover all cases. For example what would the expected output be for this string "This is a weirdly spaced string" ?
This comment is hidden because it contains spoiler information about the solution