4 require File.expand_path(File.dirname(__FILE__) + '/edgecase')
6 class AboutAsserts < EdgeCase::Koan
8 # We shall contemplate truth by testing reality, via asserts.
11 assert true # This should be true
14 assert false # This should be true
20 # Enlightenment may be more easily achieved with appropriate
22 def test_assert_with_message
24 assert true, "This should be true -- Please fix this"
27 assert false, "This should be true -- Please fix this"
33 # To understand reality, we must compare our expectations against
35 def test_assert_equality
36 expected_value = __(2)
39 assert expected_value == actual_value
42 # Some ways of asserting equality are better than others.
43 def test_a_better_way_of_asserting_equality
44 expected_value = __(2)
47 assert_equal expected_value, actual_value
50 # Sometimes we will ask you to fill in the values
51 def test_fill_in_values
52 assert_equal __(2), 1 + 1