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.
Thank you, I'm glad you liked it!
I'm curious, why is
assert_equals
implemented with(actual, expected)
arguments and not(expected, actual)
like in T::U. In one kata this caused a situation where modified original input caused some test cases to fail.Oh well, my bad, sorry. Didn't think Codewars is using a custom test framework.
According to https://github.com/Codewars/kata-test-framework-ruby/blob/master/framework.rb#L147 real order is
actual, expected
, so you're right.Now I'm curious why is it implemented this way.
According to rubydocs, it is not. http://ruby-doc.org/stdlib-2.1.0/libdoc/test/unit/rdoc/Test/Unit/Assertions.html#method-i-assert_equal
Correct order is
expected, actual
.Excellent kata. Although after submitting my cheating solution and reading intended one I feel disappointed I didn't make it "the right way". Still, enjoyed every second of it.