1
require 'test/minirunit'
2
test_check "Test Classes"
5
@hello = "Hello World."
13
test_equal("Hello World." , hello.saveHelloWorld)
14
test_equal("Hello World." , hello.getHelloWorld)
17
test_equal(Object, c.superclass)
19
test_equal(String, c.superclass)
20
test_exception(TypeError) {
28
test_equal('TestClasses::TestClass', testClass.name)
30
DifferentNameForTestClass = testClass
31
test_equal('TestClasses::TestClass', testClass.name)
33
testModule = Module.new
35
TestModule = testModule
36
test_equal('TestClasses::TestModule', testModule.name)
38
DifferentNameForTestModule = testModule
39
test_equal('TestClasses::TestModule', testModule.name)
41
def TestClasses.virtual
53
test_equal("uninitialized constant Foo", e.to_s)
57
class X < TestClasses::Bar
61
test_equal("uninitialized constant TestClasses::Bar", e.to_s)
69
test_equal("can't make subclass of Class", e.to_s)
73
class X < TestClasses.virtual
76
test_equal("can't make subclass of virtual class", e.to_s)
80
def self.mock methodName
81
define_method "showBug" do
84
fail "Hash should have something" if @results == {}
86
fail "||= destroyed a perfectly good hash" if @results == {}