fix tests according to array change
This commit is contained in:
@ -15,25 +15,25 @@ class ObjectSof < MiniTest::Test
|
||||
end
|
||||
def test_array_object
|
||||
@out = [true, 1234 , ObjectWithAttributes.new]
|
||||
check "-true\n-1234\n-#{OBJECT_STRING}"
|
||||
check "- true\n- 1234\n- #{OBJECT_STRING}"
|
||||
end
|
||||
def test_array_array_object
|
||||
@out = [true, 1 , [true , 12 , ObjectWithAttributes.new]]
|
||||
check "-true\n-1\n--true\n -12\n -#{OBJECT_STRING}"
|
||||
check "- true\n- 1\n- - true\n - 12\n - #{OBJECT_STRING}"
|
||||
end
|
||||
def test_hash_object
|
||||
@out = { one: 1 , two: ObjectWithAttributes.new }
|
||||
check "-:one => 1\n-:two => #{OBJECT_STRING}"
|
||||
@out = { :one => 1 , :two => ObjectWithAttributes.new }
|
||||
check "- :one => 1\n- :two => #{OBJECT_STRING}"
|
||||
end
|
||||
def test_hash_array
|
||||
@out = { one: [1 , ObjectWithAttributes.new] , two: true }
|
||||
check "-:one => -1\n -#{OBJECT_STRING}\n-:two => true"
|
||||
@out = { :one => [1 , ObjectWithAttributes.new] , :two => true }
|
||||
check "- :one => - 1\n - #{OBJECT_STRING}\n- :two => true"
|
||||
end
|
||||
def test_object_recursive
|
||||
object = ObjectWithAttributes.new
|
||||
object.extra = object
|
||||
@out = object
|
||||
check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)"
|
||||
check "&1 ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => ->1)"
|
||||
end
|
||||
def test_object_inline
|
||||
object = ObjectWithAttributes.new
|
||||
@ -44,7 +44,7 @@ class ObjectSof < MiniTest::Test
|
||||
def test_volotile
|
||||
@out = ObjectWithAttributes.new
|
||||
@out.volotile = 42
|
||||
check "ObjectWithAttributes(:name => 'some name', :number => 1234)"
|
||||
check "#{OBJECT_STRING}"
|
||||
end
|
||||
def test_class
|
||||
@out = ObjectWithAttributes
|
||||
@ -55,6 +55,6 @@ class ObjectSof < MiniTest::Test
|
||||
object.extra = ObjectWithAttributes
|
||||
ar = [object , ObjectWithAttributes]
|
||||
@out = ar
|
||||
check "-ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => *1)\n-&1 ObjectWithAttributes"
|
||||
check "- ObjectWithAttributes(:name => 'some name', :number => 1234, :extra => ->1)\n- &1 ObjectWithAttributes"
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user