Sha256: ceb5aa85718c1da06fbf3d162cb9c98cf0b3242b32ced5d46f731dda765f1bfd
Contents?: true
Size: 729 Bytes
Versions: 218
Compression:
Stored size: 729 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__),"..","lib") require 'test/unit' require 'rgen/metamodel_builder' require 'rgen/fragment/model_fragment' class ModelFragmentTest < Test::Unit::TestCase module TestMetamodel extend RGen::MetamodelBuilder::ModuleExtension class SimpleClass < RGen::MetamodelBuilder::MMBase has_attr 'name', String contains_many 'subclass', SimpleClass, 'parent' end end def test_elements root = TestMetamodel::SimpleClass.new(:name => "parent", :subclass => [TestMetamodel::SimpleClass.new(:name => "child")]) frag = RGen::Fragment::ModelFragment.new("location") frag.set_root_elements([root]) assert_equal 2, frag.elements.size end end
Version data entries
218 entries across 218 versions & 3 rubygems