__END__ $:.unshift File.join(File.dirname(__FILE__), '..', '..', 'lib') require 'yaml' require 'test/unit' require 'glue/metadata' class Dummy include MetadataMixin attr_accessor :name ann :name, :class => String ann :properties => :name def run puts 'hello' end ann :run, :doc => 'documentation' ann :order => 'oid DESC' end class TestMetadata < Test::Unit::TestCase # :nodoc: all def test_all p Dummy.metadata.self.properties assert_equal 'documentation', Dummy.metadata.run.doc assert_equal 'oid DESC', Dummy.metadata.self.order assert_equal 1, Dummy.metadata.self.properties.size end end