views:

35

answers:

1

I am currently building an application with one of the models being 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?

+4  A: 

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.

Ron Romero