|
assert true
assert 1
assert "foo"
assert false
|
# Simple assertions
# As true is neither nil or false, this assertion passes
# Similarly, 1 passes
# As do string
# This will raise an exception
|
|
assert (1 + 1) == 2
assert [:a, :b, :c].size == 3
|
# More interesting assertions
# Ensure that arithmetic is sane!
# ensure lists can be correctly counted
|