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.
yes, I totally agree with your second comment, but not the first ;) I've added additional test for this case:
My solution to this kata already passes this test case :)
you're right, examples changed, thx
I am not sure why you suggest that behavior. If I go to the shop and give them coupon with value 10$ I can get book with price 7$ for free. You 'loose' 3$ but it is still valid coupon. I'm pretty sure this works in Poland that way ;)
In your example 5 is the valid value for this order, so the test with 15 would be invalid ;)
just to mark resolved
I think this doesn't matter for kata, but few comments ago I had idea that empty array can be for empty pockets, and nil can be for 'no pockets' in real life example ;)
from docs "Kata Approval":
how can I ask someone to come back and mark issue resolved? Does the issue expire? Can you block any beta kata now in this way?
Strange, I've added your debug line and have valid values, really don't know what can I do with this
Description updated with your suggestions although I don't fully aggree with your points ;) In real life clients tend to write/speak short description of their problem (often badly) and after some discussion I write tests to match desired behaviour of the app ;)
Weird, there is no tests with values you provided, in first example value for aventures is 4 not 3.6, in second: 25
Typo fixed.
I don't think that description isn't sufficient, there is warning about valid coupons and everybody (should) knows that you cannot have negative values for orders ;) You are given this feedback in the tests too
And finally there is no tests with problematic results for example 1.33333, I wanted it to be simple, 2 decimal places are standard for order/currency calculations.
thank you for this hint, I didn't see this in the docs, fixed
edit: omg, I'm so blind ;)
This comment is hidden because it contains spoiler information about the solution
lot of fun with this kata, lot of nice solutions to read, thanks
I marked it clever but I think it's 'too hardcoded'. It looks more like picking some values and merging them than calculating.
'and' should not be used in logical comparisions, it should be used only in flow logic, for example in ruby on rails controllers you often see something like:
yes, using 'and' often gives valid results but it's bad practice because the 'and' operation has lower precedence than '&&' and you asking for strange bugs in code
I forgot that there is no real rspec ;) descriptions added
I wanted it to be like some additional kind of puzzle with this kata, but you are right, this can be confusing, starter fixed