rubyx/test/melon/test_compiler.rb
Torsten Ruger f0350601a7 Move the space instance to the parfait module
A better fit, maybe even a pattern for singletons
2016-12-30 14:10:49 +02:00

24 lines
642 B
Ruby

require_relative "helper"
module Melon
class TestClass < MiniTest::Test
def setup
Register.machine.boot unless Register.machine.booted
end
def test_creates_class_without_deriviation
Compiler.compile "class Testing ; end"
assert t = Parfait.object_space.get_class_by_name(:Testing) , "No classes created"
assert_equal :Object , t.super_class_name
end
def test_creates_class_with_deriviation
Compiler.compile "class Test2 < List ;end"
assert t = Parfait.object_space.get_class_by_name(:Test2) , "No classes created"
assert_equal :List , t.super_class_name
end
end
end