The default unit testing framework for Ruby as of Ruby 1.9.x is the very capable MiniTest. Read on to find out how to use it best to your advantage.
While assertions are just fine, MiniTest also provides an RSpec-like interface for doing spec statements. For example, instead of saying assert_empty a, you can simply say a.must_be_empty. While this sounds ... Read More
Like Test::Unit, MiniTest provides a small library of assertions for you to use. While you can just cram any statement into assert or refute, it's much more readable to use ... Read More
MiniTest replaced Test::Unit in the Ruby standard library as of Ruby 1.9.x. And while it is (mostly) a drop-in replacement for Test::Unit, there are some differences and improvements. First up, ... Read More