Sha256: 88693e98cb8c2eec00c4332a985ff2ad2e5d014a7b6eb7337304f741f6ab06f6

Contents?: true

Size: 402 Bytes

Versions: 2

Compression:

Stored size: 402 Bytes

Contents

require 'anise/annotator'

include Anise::Annotator

class Test_Annotator_Toplevel < Test::Unit::TestCase

  class X
    annotator :req

    req 'r'
    def a ; "a"; end

    req 's', 't'
    attr :b
  end

  def test_annotated
    assert_equal( {:req=>'r'}, X.ann(:a) )
  end

  def test_annotated
    assert_equal( {:req=>['s','t']}, X.ann(:b) )
  end

end

#annotator :req  # THIS DOES NOT WORK :(

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
anise-0.6.0 test/test_annotator_toplevel.rb
anise-0.5.0 test/test_annotator_toplevel.rb