mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
1325437297
* lib/rdoc/parser/ruby.rb (RDoc::Parser::Ruby): Don't parse rdoc files, reverts r24976 in favor of include directive support in C parser. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
48 lines
713 B
Ruby
48 lines
713 B
Ruby
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
|
|
|