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 is a standard tree search kata, which has been done a lot of CW.
Needs sample tests.
No random tests.
Tests should use
assert_equals
.Needs random tests
It's been a while, but I've updated the tests to catch invalid tests -- most notably, cyclic roles.
Feel free to provide more feedback!
No test cases! Also semantics not fully specified (what if it has :apple and "apple" ?)
Needs tests
The tests should be augmented. The current tests don't seem to test (judging by accepted solutions) for the case when roles are not added implicitly to the role on which we call
all_permissions
, but only as sub-roles of other roles. E.g.:Also, should test for circular references announces in the kata description ("A role can reference itself"). E.g., extending my example from above:
Whew, that was a great, challenging kata - nice job!
Very cute :)
You should test for permissions inherited from two levels up; there's currently at least one solution that doesn't support them.
Thanks for the feedback!
Originally I had intended only to override the
hsh[:key]
methods. Now that you mention it, I might consider testing for the other methods you've mentioned as well :PThis comment is hidden because it contains spoiler information about the solution