Class | HelpTest |
In: |
lib/ihelp.rb
|
Parent: | Test::Unit::TestCase |
# File lib/ihelp.rb, line 1001 1001: def no_warn 1002: old_w = $-w 1003: $-w = nil 1004: yield 1005: $-w = old_w 1006: end
# File lib/ihelp.rb, line 1008 1008: def setup 1009: no_warn{ 1010: Object.const_set("ARGV", ["--readline", "--prompt-mode", "simple"]) 1011: } 1012: IHelp.instance_variable_set( 1013: :@ri_driver, 1014: IHelp::IHelpDriver.new([])) 1015: end
# File lib/ihelp.rb, line 1037 1037: def test_class_inherited_method_help 1038: assert(String.help_yaml(:map)) 1039: end
# File lib/ihelp.rb, line 1033 1033: def test_class_method_help 1034: assert(String.help_yaml(:new)) 1035: end
# File lib/ihelp.rb, line 1055 1055: def test_help_yamlings 1056: assert("string".help_yaml(:reverse) == 1057: help_yaml("String#reverse")) 1058: assert(String.help_yaml(:new) == 1059: help_yaml("String::new")) 1060: end
# File lib/ihelp.rb, line 1025 1025: def test_inherited_method_help 1026: assert("string".help_yaml(:map)) 1027: end
# File lib/ihelp.rb, line 1048 1048: def test_method_constraints 1049: assert((not "string".help_yaml(:new,true))) 1050: assert((not "string".help_yaml(:reverse,false))) 1051: assert((not String.help_yaml(:new,true))) 1052: assert((not String.help_yaml(:reverse,false))) 1053: end
# File lib/ihelp.rb, line 1041 1041: def test_method_equalities 1042: assert(String.help_yaml(:new) == 1043: "string".help_yaml(:new)) 1044: assert(String.help_yaml(:reverse) == 1045: "string".help_yaml(:reverse)) 1046: end
# File lib/ihelp.rb, line 1021 1021: def test_method_help 1022: assert("string".help_yaml(:reverse)) 1023: end
# File lib/ihelp.rb, line 1062 1062: def test_multipart_namespaces 1063: assert(Test::Unit.help_yaml) 1064: assert(help_yaml("Test::Unit")) 1065: assert(Test::Unit.help_yaml("run?")) 1066: assert(help_yaml("Test::Unit.run?")) 1067: assert(help_yaml("Test::Unit::run?")) 1068: assert(help_yaml("Test::Unit#run?")) 1069: end
# File lib/ihelp.rb, line 1071 1071: def test_not_found 1072: assert((NoHelp.help_yaml == nil)) 1073: assert((String.help_yaml(:nonexistent) == nil)) 1074: end