Setting the Stage: Codewars
Codewars is this awesome site where you can learn Ruby or JS by training on “katas” and climbing the ranks of code warriors on the site. The more elegant and efficient your solution to increasingly difficult challenges, the more honor you incur.
the path to enlightenment was winding
Now while that sounds straightforward enough, I must confess it took me a solid couple of hours to realize that Codewars was not using a native Ruby test framework, but rather was utilizing their own testing API (and not just using some built-in T::U syntactic sugar or something):
1 2 3 4
Here’s the docs for the Ruby Test methods that are provided by Codewars’ API. Pretty fancy, huh?
simpler route: use RSpec, even for miniscule test suites
While I appreciate the work the Codewars guys have done on this Test module, I don’t think learning yet another testing DSL (even though it’s only slightly different from RSpec) makes any sense. I’m actually a little confused as to why they would implement their own test framework in lieu of one of the already-accepted and ubiquitous frameworks like RSpec.
I prefer to do as close to 100% of my code-writing in Sublime as possible (practice makes perfect, ya’ know?)