Sha256: 94e89c144045db7989ae1030749e691682201523731f8a77226b2e6fe6d68629

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

__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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
glue-0.23.0 test/glue/tc_metadata.rb