2011-03-29 23:38:53 -04:00
|
|
|
require 'psych/helper'
|
2010-03-28 17:49:37 -04:00
|
|
|
|
|
|
|
module Psych
|
|
|
|
class TestArray < TestCase
|
|
|
|
def setup
|
|
|
|
super
|
|
|
|
@list = [{ :a => 'b' }, 'foo']
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_self_referential
|
|
|
|
@list << @list
|
|
|
|
assert_cycle(@list)
|
|
|
|
end
|
|
|
|
|
|
|
|
def test_cycle
|
|
|
|
assert_cycle(@list)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|