test/yargi/hypotheses_test.rb in yargi-0.1.2 vs test/yargi/hypotheses_test.rb in yargi-0.2.0

- old
+ new

@@ -1,12 +1,12 @@ require 'test/unit' module Yargi - - # Checks some hypotheses that we make about Ruby + + # Checks some hypotheses that we make about Ruby class HypothesesTest < Test::Unit::TestCase - + def test_method_missing_handles_block_as_expected p = Object.new def p.say_hello who = block_given? ? yield : "anonymous" "Hello #{who}" @@ -22,9 +22,9 @@ assert_equal "Hello blambeau", p.say_hello {"blambeau"} o.set_obj(p) assert_equal "Hello anonymous", o.say_hello assert_equal "Hello blambeau", o.say_hello {"blambeau"} end - + end # class HypothesesTest end