1 require File.expand_path(File.dirname(__FILE__) + '/edgecase')
3 class AboutOpenClasses < EdgeCase::Koan
10 def test_as_defined_dogs_do_bark
12 assert_equal __, fido.bark
15 # ------------------------------------------------------------------
17 # Open the existing Dog class and add a new method.
24 def test_after_reopening_dogs_can_both_wag_and_bark
26 assert_equal __, fido.wag
27 assert_equal __, fido.bark
30 # ------------------------------------------------------------------
38 def test_even_existing_built_in_classes_can_be_reopened
39 assert_equal __, 1.even?
40 assert_equal __, 2.even?
43 # NOTE: To understand why we need the :: before Integer, you need to
44 # become enlightened about scope.