@@ -1525,6 +1525,9 @@ def setup
1525
1525
incmod_private_method = @incmod . add_method ( RDoc ::AnyMethod . new ( nil , "incmod_private_method" ) )
1526
1526
incmod_private_method . visibility = :private
1527
1527
1528
+ incmod_private_attr = @incmod . add_attribute ( RDoc ::Attr . new ( nil , "incmod_private_attr" , "RW" , "" ) )
1529
+ incmod_private_attr . visibility = :private
1530
+
1528
1531
extmod_tl = @store . add_file ( "extmod.rb" )
1529
1532
@extmod = extmod_tl . add_module ( RDoc ::NormalModule , "Extmod" )
1530
1533
@@ -1539,6 +1542,9 @@ def setup
1539
1542
extmod_private_method = @extmod . add_method ( RDoc ::AnyMethod . new ( nil , "extmod_private_method" ) )
1540
1543
extmod_private_method . visibility = :private
1541
1544
1545
+ extmod_private_attr = @extmod . add_attribute ( RDoc ::Attr . new ( nil , "extmod_private_attr" , "RW" , "" , true ) )
1546
+ extmod_private_attr . visibility = :private
1547
+
1542
1548
@klass . add_include ( RDoc ::Include . new ( "Incmod" , nil ) )
1543
1549
@klass . add_extend ( RDoc ::Include . new ( "Extmod" , nil ) )
1544
1550
@@ -1577,6 +1583,7 @@ def test_embed_mixin_when_true_embeds_methods_and_constants
1577
1583
assert_equal ( @incmod , instance_attr . mixin_from )
1578
1584
1579
1585
refute ( @klass . method_list . find { |m | m . name == "incmod_private_method" } )
1586
+ refute ( @klass . attributes . find { |m | m . name == "incmod_private_attr" } )
1580
1587
1581
1588
class_method = @klass . method_list . find { |m | m . name == "extmod_method" }
1582
1589
assert ( class_method , "class method from extended mixin should be present" )
@@ -1589,6 +1596,7 @@ def test_embed_mixin_when_true_embeds_methods_and_constants
1589
1596
assert_equal ( @extmod , class_attr . mixin_from )
1590
1597
1591
1598
refute ( @klass . method_list . find { |m | m . name == "extmod_private_method" } )
1599
+ refute ( @klass . attributes . find { |m | m . name == "extmod_private_attr" } )
1592
1600
1593
1601
# assert that sections are also imported
1594
1602
constant_section = @klass . sections . find { |s | s . title == "Incmod const section" }
0 commit comments