Permalink
Browse files

Added test for deep hash with rockets

  • Loading branch information...
1 parent 130c72f commit 4b2968042d77f05533e6d514bc48410c1f04377a @turboladen committed Apr 9, 2012
View
1 features/indentation/good_files_with_no_trailing_newline.feature
@@ -119,6 +119,7 @@ Feature: Indentation check on good files without trailing newlines
| indent/ok/multi_line_lonely_braces_as_t_string |
| indent/ok/multi_line_braces_embedded_arrays |
| indent/ok/braces_combo |
+ | indent/ok/deep_hash_with_rockets |
@single_line @brackets
Scenarios: Good single-line bracket uses
View
46 features/support/file_cases/indentation_cases.rb
@@ -357,51 +357,65 @@ def a_method
end}
INDENT_OK[:loop_with_braces] =
- %Q{loop {
+ %Q<loop {
puts 'stuff'
-}}
+}>
#----------- Braces ----------#
INDENT_OK[:single_line_braces] =
- %Q{{ one: 1, two: 2 }}
+ %Q<{ one: 1, two: 2 }>
INDENT_OK[:single_line_braces_as_t_string] =
- %Q{%Q{this is a t string!}}
+ %Q<%Q{this is a t string!}>
INDENT_OK[:multi_line_braces] =
- %Q{{ one: 1,
- two: 2 }}
+ %Q<{ one: 1,
+ two: 2 }>
INDENT_OK[:multi_line_braces_as_t_string] =
- %Q{%Q{this is a t string!
-suckaaaaaa!}}
+ %Q<%Q{this is a t string!
+suckaaaaaa!}>
+# For some reason, Ruby doesn't like '%Q<> here. Using [] instead.
INDENT_OK[:multi_line_lonely_braces] =
- %Q{{
+ %Q[{
:one => 'one', :two => 'two',
:three => 'three'
-}}
+}]
INDENT_OK[:multi_line_lonely_braces_as_t_string] =
- %Q{%Q{
+ %Q<%Q{
this is a t string!
suckaaaaaa!
-}}
+}>
INDENT_OK[:multi_line_braces_embedded_arrays] =
- %Q{{
+ %Q[{
:one => ['one', 17, {}], :two => ['two'],
:three => 'three'
-}}
+}]
+
INDENT_OK[:braces_combo] =
- %Q{{ three: 3 }
+ %Q<{ three: 3 }
{
three: 3 }
{ three: 3
}
{
three: 3
-}}
+}>
+
+INDENT_OK[:deep_hash_with_rockets] =
+ %Q[im_deep =
+ { "one" =>
+ { "1" =>
+ { "a" => "A",
+ "b" => "B",
+ "c" => "C" },
+ "2" =>
+ { "d" => "D",
+ "e" => "E",
+ "f" => "F" } } }]
#----------- Brackets ----------#
INDENT_OK[:single_line_brackets] =

0 comments on commit 4b29680

Please sign in to comment.