Sha256: c315001263f5e2b280afc4e32f7a6e9e26ff001b6b042b7d00660b85773f0be3
Contents?: true
Size: 764 Bytes
Versions: 97
Compression:
Stored size: 764 Bytes
Contents
require 'test/unit' require 'abstract_unit' require 'active_support/core_ext/class/inheritable_attributes' class A include ClassInheritableAttributes end class B < A write_inheritable_array "first", [ :one, :two ] end class C < A write_inheritable_array "first", [ :three ] end class D < B write_inheritable_array "first", [ :four ] end class ClassInheritableAttributesTest < Test::Unit::TestCase def test_first_level assert_equal [ :one, :two ], B.read_inheritable_attribute("first") assert_equal [ :three ], C.read_inheritable_attribute("first") end def test_second_level assert_equal [ :one, :two, :four ], D.read_inheritable_attribute("first") assert_equal [ :one, :two ], B.read_inheritable_attribute("first") end end
Version data entries
97 entries across 97 versions & 7 rubygems