Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Support expected exceptions #10
Sometimes you want to show how your code can fail, meaning you want it to raise an exception. Python's doctest supports exceptions: https://docs.python.org/3.4/library/doctest.html#what-about-exceptions.
>>> 1 / 0 Traceback (most recent call last): File "<stdin>", line 1, in <module> ZeroDivisionError: integer division or modulo by zero
I cannot get a similar example to work using Ruby DocTest.
While it is certainly possible to get this behavior with rubydoctest, I decided to make my own gem instead. You can read more about it here: http://taylor.fausak.me/2014/09/23/executable-documentation/
Since this issue hasn't had any movement for a year, I'll just close it.