Use a tuple to get indexed access to a arguments
This commit is contained in:
@@ -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]
|
||||
|
||||
|
8
test/sample_koan_test.exs
Normal file
8
test/sample_koan_test.exs
Normal file
@@ -0,0 +1,8 @@
|
||||
defmodule SampleKoan do
|
||||
use Koans
|
||||
|
||||
koan "thinking more than once" do
|
||||
assert 3 == :__
|
||||
assert 4 == :__
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user