From 14150796597d5c420cb5af64039c45869b5e8a84 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Fri, 15 Aug 2014 15:08:45 +0300 Subject: [PATCH] test with array in array in array --- test/sof.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/sof.rb b/test/sof.rb index eb931aec..d98a11e8 100644 --- a/test/sof.rb +++ b/test/sof.rb @@ -24,12 +24,21 @@ class BasicSof < MiniTest::Test out = Sof::Writer.write([true, 1234]) assert_equal "-true\n-1234\n" , out end - def test_array_with_object + def test_array_object out = Sof::Writer.write([true, 1234 , ObjectWithAttributes.new]) assert_equal "-true\n-1234\n-ObjectWithAttributes(name: 'some object' ,number: 1234)\n\n" , out end - def test_array_with_array - out = Sof::Writer.write([true, 1234 , [true , 12 ]]) + def test_array_array + out = Sof::Writer.write([true, 1 , [true , 12 ]]) + assert_equal "-true\n-1\n--true\n -12\n\n" , out + end + def test_array_array_array + out = Sof::Writer.write([true, 1 , [true , 12 , [true , 123 ]]]) + assert_equal "-true\n-1\n--true\n -12\n --true\n -123\n\n\n" , out + end + def ttest_array_array_object + out = Sof::Writer.write([true, 1 , [true , 12 , ObjectWithAttributes.new]]) +# puts out assert_equal "-true\n-1234\n--true\n -12\n\n" , out end