55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/yamatanooroti.rb', line 55
def self.inherited(klass)
super
if ancestors.first == Yamatanooroti::TestCase
if Yamatanooroti.has_vterm_gem?
test_klass = Class.new(klass)
klass.const_set(:TestVTerm, test_klass)
test_klass.include Yamatanooroti::VTermTestCaseModule
@@runners << test_klass
end
if Yamatanooroti.win?
test_klass = Class.new(klass)
klass.const_set(:TestWindows, test_klass)
test_klass.include Yamatanooroti::WindowsTestCaseModule
@@runners << test_klass
end
if @@runners.empty?
raise LoadError.new(" Any real(?) terminal environments not found.\n Supporting real(?) terminals:\n - vterm gem\n - Windows\n EOM\n end\n def klass.method_added(name)\n super\n if ancestors[1] == Yamatanooroti::TestCase\n test_klass = @@runners.find { |test_klass| test_klass.ancestors.include?(self) }\n test_klass.define_method(name, instance_method(name))\n remove_method name\n end\n end\n end\nend\n")
|