test/cache_test.rb in lru_redux-0.8.1 vs test/cache_test.rb in lru_redux-0.8.2

- old
+ new

@@ -55,12 +55,21 @@ def test_delete @c[:a] = 1 @c[:b] = 2 @c[:c] = 3 + @c.delete(:a) + assert_equal [[:c,3],[:b,2]], @c.to_a + assert_nil @c[:a] + + # Regression test for a bug in the legacy delete method @c.delete(:b) - assert_equal [[:c,3],[:a,1]], @c.to_a + @c[:d] = 4 + @c[:e] = 5 + @c[:f] = 6 + + assert_equal [[:f,6],[:e,5],[:d,4]], @c.to_a assert_nil @c[:b] end def test_update @c[:a] = 1