Sha256: 9d88361905fbb0790548071f94012ed4b481ac05909c9cf29872c6d2eb057a43

Contents?: true

Size: 713 Bytes

Versions: 9

Compression:

Stored size: 713 Bytes

Contents

require 'rubygems'
require 'minitest/autorun'
require 'rdoc/rdoc'

class TestRDocAttr < MiniTest::Unit::TestCase

  def setup
    @a = RDoc::Attr.new nil, 'attr', 'RW', ''
  end

  def test_arglists
    assert_nil @a.arglists
  end

  def test_block_params
    assert_nil @a.block_params
  end

  def test_call_seq
    assert_nil @a.call_seq
  end

  def test_full_name
    assert_equal '(unknown)#attr', @a.full_name
  end

  def test_params
    assert_nil @a.params
  end

  def test_singleton
    refute @a.singleton
  end

  def test_type
    assert_equal 'attr_accessor', @a.type

    @a.rw = 'R'

    assert_equal 'attr_reader', @a.type

    @a.rw = 'W'

    assert_equal 'attr_writer', @a.type
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rdoc-2.5.9 test/test_rdoc_attr.rb
rdoc-2.5.8 test/test_rdoc_attr.rb
rdoc-2.5.7 test/test_rdoc_attr.rb
rdoc-2.5.6 test/test_rdoc_attr.rb
rdoc-2.5.5 test/test_rdoc_attr.rb
rdoc-2.5.4 test/test_rdoc_attr.rb
rdoc-2.5.3 test/test_rdoc_attr.rb
rdoc-2.5.2 test/test_rdoc_attr.rb
rdoc-2.5.1 test/test_rdoc_attr.rb