redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

cleanup/rework how setups/teardowns are run #178

Closed kellyredding closed 10 years ago

kellyredding commented 10 years ago

Previously the single setup method was used both to add blocks or methods and to run the added setups. This was originally done to minimize "method pollution" on the context class, but this reasoning doesn't seem to outweigh the added complexity of determining which case this method is being called for.

This breaks out a new method run_setup to more implicitly know when you are adding a setup or running them.

Same thing goes for the teardowns. This doesn't change the "intended" API as run_setup is only called internally. This is in prep for doing the "around" callbacks feature.

@jcredding ready for review.

jcredding commented 10 years ago

@kredding - Cool, the methods are much easier to comprehend with the adding and running separated. Looks good :boom: