From ba71e568ef69e558fa185678a3221563d1894568 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 19 Aug 2014 23:23:03 +0300 Subject: [PATCH] made a test for short object feature --- test/sof.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/sof.rb b/test/sof.rb index faa77ab0..93d56bcf 100644 --- a/test/sof.rb +++ b/test/sof.rb @@ -86,6 +86,12 @@ class BasicSof < MiniTest::Test @out = Sof::Writer.write(object) check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)" end + def test_object_inline + object = ObjectWithAttributes.new + object.extra = Object.new + @out = Sof::Writer.write(object) + check "ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => Object())" + end def test_class @out = Sof::Writer.write(ObjectWithAttributes) check "ObjectWithAttributes"