Created
June 28, 2013 21:54
-
-
Save justinj/5888456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FFFFF..FF.FF | |
Failures: | |
1) Indenting single body functions inside do block is declared with fn syntax | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "def do\n some_func = fn x -> x end\nend" | |
got: "def do\nsome_func = fn x -> x end\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,4 +1,4 @@ | |
def do | |
- some_func = fn x -> x end | |
+some_func = fn x -> x end | |
end | |
# ./spec/indent/anonymous_functions_spec.rb:6:in `block (3 levels) in <top (required)>' | |
2) Indenting single body functions inside do block is declared with function syntax | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "def do\n some_func = function do x -> x end\nend" | |
got: "def do\nsome_func = function do x -> x end\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,4 +1,4 @@ | |
def do | |
- some_func = function do x -> x end | |
+some_func = function do x -> x end | |
end | |
# ./spec/indent/anonymous_functions_spec.rb:14:in `block (3 levels) in <top (required)>' | |
3) Indenting single body functions inside do block spans in multiple lines | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "def test do\n assert_raise Queue.Empty, fn ->\n Q.new |> Q.deq!\n end\nend" | |
got: "def test do\n assert_raise Queue.Empty, fn ->\n Q.new |> Q.deq!\nend\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,6 +1,6 @@ | |
def test do | |
assert_raise Queue.Empty, fn -> | |
Q.new |> Q.deq! | |
- end | |
+end | |
end | |
# ./spec/indent/anonymous_functions_spec.rb:22:in `block (3 levels) in <top (required)>' | |
4) Indenting single body functions inside do block spans in multiple lines inside parentheses | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "defmodule Test do\n def lol do\n Enum.map([1,2,3], fn x ->\n x * 3\n end)\n end\nend" | |
got: "defmodule Test do\n def lol do\n Enum.map([1,2,3], fn x ->\n x * 3\nend)\nend\nend" | |
(compared using ==) | |
Diff: | |
@@ -2,7 +2,7 @@ | |
def lol do | |
Enum.map([1,2,3], fn x -> | |
x * 3 | |
- end) | |
- end | |
+end) | |
+end | |
end | |
# ./spec/indent/anonymous_functions_spec.rb:32:in `block (3 levels) in <top (required)>' | |
5) Indenting multiple body functions declaring it with fn syntax | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "fizzbuzz = fn\n 0, 0, _ -> \"FizzBuzz\"\n 0, _, _ -> \"Fizz\"\n _, 0, _ -> \"Buzz\"\n _, _, x -> x\nend" | |
got: "fizzbuzz = fn\n0, 0, _ -> \"FizzBuzz\"\n0, _, _ -> \"Fizz\"\n_, 0, _ -> \"Buzz\"\n_, _, x -> x\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,7 +1,7 @@ | |
fizzbuzz = fn | |
- 0, 0, _ -> "FizzBuzz" | |
- 0, _, _ -> "Fizz" | |
- _, 0, _ -> "Buzz" | |
- _, _, x -> x | |
+0, 0, _ -> "FizzBuzz" | |
+0, _, _ -> "Fizz" | |
+_, 0, _ -> "Buzz" | |
+_, _, x -> x | |
end | |
# ./spec/indent/anonymous_functions_spec.rb:46:in `block (3 levels) in <top (required)>' | |
6) Indenting does not consider :end as end | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "defmodule Test do\n def lol do\n IO.inspect :end\n end\nend" | |
got: "defmodule Test do\n def lol do\nIO.inspect :end\nend\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,6 +1,6 @@ | |
defmodule Test do | |
def lol do | |
- IO.inspect :end | |
- end | |
+IO.inspect :end | |
+end | |
end | |
# ./spec/indent/blocks_spec.rb:13:in `block (2 levels) in <top (required)>' | |
7) Indenting documentation with end keyword | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "defmodule Test do\n @doc \"\"\n end\n \"\"\nend" | |
got: "defmodule Test do\n @doc \"\"\nend\n\"\"\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,6 +1,6 @@ | |
defmodule Test do | |
@doc "" | |
- end | |
- "" | |
+end | |
+"" | |
end | |
# ./spec/indent/documentation_spec.rb:6:in `block (3 levels) in <top (required)>' | |
8) Indenting if-else-clauses | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "if foo do\n bar\nelse\n baz\nend" | |
got: "if foo do\n bar\n else\n baz\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,6 +1,6 @@ | |
if foo do | |
bar | |
-else | |
+ else | |
baz | |
end | |
# ./spec/indent/if_spec.rb:13:in `block (2 levels) in <top (required)>' | |
9) Indenting lists | |
Failure/Error: assert_correct_indenting <<-EOF | |
expected: "def project do\n [name: \"mix\",\n version: \"0.1.0\"]\nend" | |
got: "def project do\n [name: \"mix\",\n version: \"0.1.0\"]\nend" | |
(compared using ==) | |
Diff: | |
@@ -1,5 +1,5 @@ | |
def project do | |
[name: "mix", | |
- version: "0.1.0"] | |
+ version: "0.1.0"] | |
end | |
# ./spec/indent/lists_spec.rb:5:in `block (2 levels) in <top (required)>' | |
Finished in 1.62 seconds | |
12 examples, 9 failures | |
Failed examples: | |
rspec ./spec/indent/anonymous_functions_spec.rb:5 # Indenting single body functions inside do block is declared with fn syntax | |
rspec ./spec/indent/anonymous_functions_spec.rb:13 # Indenting single body functions inside do block is declared with function syntax | |
rspec ./spec/indent/anonymous_functions_spec.rb:21 # Indenting single body functions inside do block spans in multiple lines | |
rspec ./spec/indent/anonymous_functions_spec.rb:31 # Indenting single body functions inside do block spans in multiple lines inside parentheses | |
rspec ./spec/indent/anonymous_functions_spec.rb:45 # Indenting multiple body functions declaring it with fn syntax | |
rspec ./spec/indent/blocks_spec.rb:12 # Indenting does not consider :end as end | |
rspec ./spec/indent/documentation_spec.rb:5 # Indenting documentation with end keyword | |
rspec ./spec/indent/if_spec.rb:12 # Indenting if-else-clauses | |
rspec ./spec/indent/lists_spec.rb:4 # Indenting lists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment