Class | HelpTest |
In: |
lib/ihelp.rb
|
Parent: | Test::Unit::TestCase |
# File lib/ihelp.rb, line 537 537: def no_warn 538: old_w = $-w 539: $-w = nil 540: yield 541: $-w = old_w 542: end
# File lib/ihelp.rb, line 544 544: def setup 545: no_warn{ 546: Object.const_set("ARGV", ["--readline", "--prompt-mode", "simple"]) 547: } 548: IHelp.instance_variable_set( 549: :@ri_driver, 550: IHelp::IHelpDriver.new(IHelp::RI_ARGS)) 551: end
# File lib/ihelp.rb, line 573 573: def test_class_inherited_method_help 574: assert(String.help_yaml(:map)) 575: end
# File lib/ihelp.rb, line 569 569: def test_class_method_help 570: assert(String.help_yaml(:new)) 571: end
# File lib/ihelp.rb, line 591 591: def test_help_yamlings 592: assert("string".help_yaml(:reverse) == 593: help_yaml("String#reverse")) 594: assert(String.help_yaml(:new) == 595: help_yaml("String::new")) 596: end
# File lib/ihelp.rb, line 561 561: def test_inherited_method_help 562: assert("string".help_yaml(:map)) 563: end
# File lib/ihelp.rb, line 584 584: def test_method_constraints 585: assert((not "string".help_yaml(:new,true))) 586: assert((not "string".help_yaml(:reverse,false))) 587: assert((not String.help_yaml(:new,true))) 588: assert((not String.help_yaml(:reverse,false))) 589: end
# File lib/ihelp.rb, line 577 577: def test_method_equalities 578: assert(String.help_yaml(:new) == 579: "string".help_yaml(:new)) 580: assert(String.help_yaml(:reverse) == 581: "string".help_yaml(:reverse)) 582: end
# File lib/ihelp.rb, line 557 557: def test_method_help 558: assert("string".help_yaml(:reverse)) 559: end
# File lib/ihelp.rb, line 598 598: def test_multipart_namespaces 599: assert(Test::Unit.help_yaml) 600: assert(help_yaml("Test::Unit")) 601: assert(Test::Unit.help_yaml("run?")) 602: assert(help_yaml("Test::Unit.run?")) 603: assert(help_yaml("Test::Unit::run?")) 604: assert(help_yaml("Test::Unit#run?")) 605: end
# File lib/ihelp.rb, line 607 607: def test_not_found 608: assert((NoHelp.help_yaml == nil)) 609: assert((String.help_yaml(:nonexistent) == nil)) 610: end