More design success
I just got finished with working on the ranking stuff a bit. Writing out the CRC cards and then the specification based tests seemed to work very well. The specification got fleshed out as I was writing the test, those simple CRCÂ cards were all that I really needed.
After reading the Django documentation, I also learned that I’ll be putting most of the logic for getting rankings by date into a custom Manager class.
The one issue I ran into is when I had a syntax error in a file under test, spec barfed and I had to run nosetests without any options to track it down. But it wasn’t that big of a deal.
It’s also nice how you can set it to output colors for specification/tests that pass/fail or are skipped. I stubbed out a few tests that I haven’t implemented yet as skipped tests.
By outptutting the list of specifications every run, it also forces me to name my tests correctly. I’ve refactored the tests and test classes several times to use a more accurate description.
This is an awesome way to develop. I’m definitely adding better formatting to nose spec after I finish this project.