I am currently building an application with one of the models be开发者_Go百科ing fairly complex. I am currently using assertions
raise "error message" if "settings failed"
question is - what are the advantages of using the Unit:testing frameworks over these assertions?
One of the biggest advantages is that unit tests can be automated. You can run all your unit tests after every build, and you immediately find problems. With assertions, bugs might hang around for weeks (or more) before someone happens to exercise that portion of the code.
精彩评论