appacademy/prep-work — pull request #46 by CorySpitzer (2014-11-03 20:07:31+00:00)
Title: I added a test to the spec for 04_wonky_coins

While doing the app academy practice for my interview, I wrote the following bit of code for the 04_wonky_coins. It passed all the tests, but it didn't really seem right:

def wonky_coins(val)
return val*2 + 1
end

I compared it to code given in the solution, and sure enough the answers started to deviate at coin values of 6 and above.

I added a test for this case in the spec, so that the above function will fail.