Assit. Runtime assertions for Ruby.
Assit is a small, lightweight plugin providing runtime assertions for Ruby. With assit you can:
- Easily place assertions anywhere in your code
- Select the action that will be taken if an assertion fails
- Disable the assertions to remove the overhead
Currently this page contains only some general information, so that the github project page is not completely dead. Check the RDoc for now for more instructions. (Note that the RDocs linked above are created from the current development version.)
Getting started
Getting started is dead easy: Just install the gem and require 'assit'. Then you're good to go. You will be able to use methods like #assit() or #assit_equals() in your code.
You can also configure the action that will be taken on a failed assertion, or disable all assertions. Check the documentation of the Config module for more info.
Credits
Assit was developed during the Talia Project. Most of the code was written by Daniel Hahn.