Use a tuple to get indexed access to a arguments

This commit is contained in:
Felipe Sere
2016-03-17 23:13:35 +00:00
parent 89dac5bb05
commit 4897527dab
3 changed files with 21 additions and 2 deletions

View File

@@ -8,6 +8,11 @@ defmodule ASTManglerTest do
assert {:+, [context: ASTManglerTest, import: Kernel], [1, 37]} == mangled
end
test "Work with multiple different replacements" do
[koan | _] = SampleKoan.all_koans
assert :ok == apply(SampleKoan, koan, [{:multiple, [3,4]}])
end
def complex_example do
[head | tail] = [1,2,3,4]

View File

@@ -0,0 +1,8 @@
defmodule SampleKoan do
use Koans
koan "thinking more than once" do
assert 3 == :__
assert 4 == :__
end
end