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.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Thanks. I agree with you even a FF player may not be able to guess the kata is inspired by FF VIII. Specially because a lot of people hated the junctioning system altogether. I changed the title to something more meaningful.
I modified the framework to do precisely that. I made a fork on github if you want to check it out. Nothing fancy but is what I'm using right now.
https://github.com/sergio-bobillier/kata-test-framework-ruby
Could you please write some examples of what are the best practices for writing tests that use random values. For example, if you want to check if the solution the user came up with works the same way your solution does when passed random input how do you call your own function? where do you put it? should you just put it in the preload block with some convoluted name?
Is it okay to use that method for making random tests, I mean:
Test.assert_equals(user_funct(rnd), author_func(rnd), "Should work with random input")
Is that ok?I don't know why people up vote this solution, is horribly inefficient. By using .include? you are making (in the worst scenario) n comparisons in the first iteration, n-1 in the second, n-2 in the third..., meaning, your algorithm is O(n²). It is actually n(n+1)/2, but still pretty inefficient. Sorting the array before the loop could help but still....
When making a kata for Ruby you should follow the Ruby naming conventions, function and variable names are lower case with underscores, not camel case.