test/test_writer_builder.rb in cheeba-1.0.4 vs test/test_writer_builder.rb in cheeba-1.1.0

- old
+ new

@@ -74,11 +74,11 @@ assert_equal exp, act end def test_hash_to_array act = [] - hsh = {1 => 1, 2 => "awesome", "3" => "awesome"} + hsh = {1 => 1, 2 => "awesome", "3" => "awesome"} exp = ["1: 1", "2: awesome", "3: awesome"] @builder.hash_to_array(act, hsh, @opt, " ") assert_equal exp, act end @@ -91,11 +91,11 @@ assert_equal exp, act end def test_hash_to_array_nested act = [] - hsh = {1 => 1, 2 => "awesome", "3" => {1 => 1, 2 => 2, 3 => 3}} + hsh = {1 => 1, 2 => "awesome", "3" => {1 => 1, 2 => 2, 3 => 3}} exp = ["1: 1", "2: awesome", "3:", " 1: 1", " 2: 2", " 3: 3"] @builder.hash_to_array(act, hsh, @opt, " ") assert_equal exp, act end @@ -124,26 +124,26 @@ assert_equal exp, act end def test_hash_to_lines act = [] - hsh = {1 => 1, 2 => "awesome", "3" => "awesome"} + hsh = {1 => 1, 2 => "awesome", "3" => "awesome"} exp = ["1: 1", "2: awesome", "3: awesome"] @builder.hash_to_lines(act, hsh, hsh.keys, @opt, " ") assert_equal exp, act end - + def test_hash_to_lines_nested_hash act = [] - hsh = {1 => 1, 2 => "awesome", "3" => {1 => 1, 2 => 2}} + hsh = {1 => 1, 2 => "awesome", "3" => {1 => 1, 2 => 2}} exp = ["1: 1", "2: awesome", "3:", " 1: 1", " 2: 2"] @builder.hash_to_lines(act, hsh, hsh.keys, @opt, " ") assert_equal exp, act end - + def test_hash_to_lines_nested_array act = [] - hsh = {1 => 1, 2 => "awesome", "3" => [1, 2, 3]} + hsh = {1 => 1, 2 => "awesome", "3" => [1, 2, 3]} exp = ["1: 1", "2: awesome", "3:", " - 1", " - 2", " - 3"] @builder.hash_to_lines(act, hsh, hsh.keys, @opt, " ") assert_equal exp, act end end