From f70afea8db720af08bddbd5db1e04d8580f42d35 Mon Sep 17 00:00:00 2001 From: Scott Davis Date: Mon, 30 Jan 2012 19:22:26 -0500 Subject: [PATCH] failing test for weird data inheritance bug --- test/units/configuration_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/units/configuration_test.rb b/test/units/configuration_test.rb index e471073b..c383aec8 100644 --- a/test/units/configuration_test.rb +++ b/test/units/configuration_test.rb @@ -93,6 +93,18 @@ class ConfigurationTest < Test::Unit::TestCase assert_equal [:b, :a], data2.stuff.to_a end + def test_inherited_array_can_append_2 + data1 = TestData.new + data1.stuff = [:a] + data2 = TestData.new + data2.stuff << :b + data2.inherit_from!(data1) + data3 = TestData.new + data3.stuff << :c + data3.inherit_from!(data2) + assert_equal [:c, :b, :a], data3.stuff.to_a + end + def test_inherited_array_can_remove data1 = TestData.new data1.stuff = [:a]