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.
Weird - I don't see any issues with the test itself, but I'm still getting an empty hash for the first argument when then run.
Is there a test case for a range of (0..9) that expects "zero (0), five (5), eight (8)"? I'm not necessarily sure it's the last one, just the last one that runs.
I'm wondering if I'm missing something on the last unit test. I did puts for the hash and range being passed in and it's showing {} for the hash and 0..9 for the range. And then it's expecting "zero (0), five (5), eight (8)" for the returned string. Is this a bug?
Thanks for the fun kata!
Unfortunately, I'm having trouble remembering exactly what I did. I think it might have been as simple as adding puts statements in some places. Definitely nothing as complicated as checking the network and xhr files. Good luck - sorry I couldnt be of more help!
Noob question - I just needed to do some basic debugging to see what was being passed in. Thanks!
It would be good to have better test output. I am getting an error on the third test, but I have no idea what the assertion is, so I don't know what to fix. Does anyone know what the test case is for the third test?
Thank you for your response Josh. I think you are on to something and I suspect it has to do with the way I'm initializing my Bag class. I currently have this, which sets the array of arguments to the @items instance variable:
def initialize(*args)
@items = args
end
If I new up a bag, and I call bag.count or bag.each do ... I get the undefined method errors. However, if I do bag.items.count or bag.items.each, those methods work. I guess my question is, do I need to figure out a way to have count and each called on the instance of the class itself? Thanks!
Can someone confirm that this Kata is still broken? I didn't do anything to the each method, and didn't use it as part of my every? implementation. I'm still getting the following message upon submission though. Any thoughts?
#each:
should execute the block for each item in the bag. why are you messing with this method? work on #every? instead.:
NoMethodError: undefined method `each' for nil:NilClass
NoMethodError: undefined method `each' for nil:NilClass