...because Ruby doesn't ship with a testing framework (anymore)
$ testing.rb is 50 lines of code
require "testing"
test "String equal?" do
assert "hello" == "hello"
end
test "Are these numbers equal?" do
assert 5 == 6
end
test "This is pending, I'll do it later"
test "Describe why it blew up" do
assert 1 == 2, "number equality"
end
$ ruby mytest.rb
String equal? [OK]
Are these numbers equal? [FAIL]
assertion failed @ mytest.rb:8
=> assert 5 == 6
This is pending, I'll do it later [PENDING]
Describe why it blew up [FAIL]
number equality @ mytest.rb:14
=> assert 1 == 2, "number equality"