Website / Report Issue / IRC Channel / Mailing List / Development
Citron is a classical unit testing framework. It defines a simple domain language for creating traditionally modeled unit tests.
Using Rubygems simply install citron:
$ gem install citron
Citron depends on ansi for terminal colorization and rubytest,
so those will be installed as well if they are not already.
Citon tests are written as a collection of testcase and test blocks.
Here is a fun example. We'll call the test file test/test_beatit.rb:
TestCase"Show them how to Beat It"dosetupdo@funky="funky"@right="right"end# failtest"show them how to funky"do@funky.assert != "funky"end# passtest"show them what's right"do@right.assert == "right"end# errortest"no one wants to be defeated"doraiseSyntaxErrorend# todotest"better do what you can"doraiseNotImplementedErrorendendCitron doesn't dictate the assertions system you use. In the above example, we are using the A.E. assertion framework. You can use any BRASS compliant system you prefer.
Citron is built on top of RubyTest. Jump over to its website to learn how to run tests and setup test run profiles.
Copyright (c) 2011 Rubyworks
Citron is distributable according to the terms of the FreeBSD license.
See COPYING.md for details.
