short hash, inline like for array. with curly braces off course

This commit is contained in:
Torsten Ruger
2014-08-27 14:46:34 +03:00
parent 6343e644b4
commit fc9615a649
2 changed files with 11 additions and 3 deletions

View File

@ -60,7 +60,7 @@ class BasicSof < MiniTest::Test
end
def test_simple_hash
@out = Sof::Writer.write({ one: 1 , tru: true })
check "-:one => 1\n-:tru => true"
check "{:one => 1, :tru => true}"
end
def test_hash_object
@out = Sof::Writer.write({ one: 1 , two: ObjectWithAttributes.new })
@ -68,7 +68,7 @@ class BasicSof < MiniTest::Test
end
def test_array_hash
@out = Sof::Writer.write([true, 1 , { one: 1 , tru: true }])
check "-true\n-1\n--:one => 1\n -:tru => true"
check "-true\n-1\n-{:one => 1, :tru => true}"
end
def test_hash_array
@out = Sof::Writer.write({ one: [1 , ObjectWithAttributes.new] , two: true })