teaminsight/assert — pull request #80 by kelredd (2011-10-10 17:34:57+00:00)
Title: Reworked Suite to track more context info

Before, a suite was just an extended hash that keyed its tests by their context class. By the nature of the hash, this allowed you to associate a tests with their context class. However, this had a few limitations:
* tests were grouped by context class by the nature of the suite object
* you had to do a suite 'prep' step to create the Test objects, the keyed context class was used to look up test methods and create test objects
* tracking extra context info (besides the class) and associating that with the Test objects was difficult

So, I updated things a bit:
* The Suite class is just an object (not a Hash extension). It just has a collection of tests.
* the 'method_added' hook is on the Context class. Anytime a 'test*' method is added, it creates a test object and adds it to the suite (no suite 'prep' step needed).
* a context info class is tracked on the suite as contexts are evaluated. Right now this class tracks the context class and the file the context was defined in (extra context info). It can be expanded to track more context info in the future
* the current context info class is given to the Test objects as they are created so a test knows its context info
* updated the test object to accept the context info class
* added tests for the context info class
* updated all the existing tests to use the method_added hook and context info class as needed