Contexts

class CalculatorTest < Test::Unit::TestCase
context "a calculator" do
setup do
@calculator = Calculator.new
end
should "add two numbers for the sum" do
assert_equal 4, @calculator.sum(2, 2)
end
should "multiply two numbers for the product" do
assert_equal 10, @calculator.product(2, 5)
end
end
end

… which combine to produce the following test methods:

"test: A User instance should return its full name."
"test: A User instance with a profile should return true when sent #has_profile?."

Assertions

It also has two additional Test::Unit assertions for working with
Ruby's Array: