Skip to content

Commit

Permalink
Fix test warnings on Elixir 1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
iruoy committed Sep 9, 2024
1 parent 2921a74 commit a1218f1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/display/intro.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule Display.Intro do
if module in modules do
""
else
show_intro(module.intro)
show_intro(module.intro())
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/execute.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Execute do
@moduledoc false
def run_module(module, callback \\ fn _result, _module, _koan -> nil end) do
Enum.reduce_while(module.all_koans, :passed, fn koan, _ ->
Enum.reduce_while(module.all_koans(), :passed, fn koan, _ ->
module
|> run_koan(koan)
|> hook(module, koan, callback)
Expand Down
2 changes: 1 addition & 1 deletion lib/tracker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule Tracker do
def set_total(modules) do
total =
modules
|> Enum.flat_map(& &1.all_koans)
|> Enum.flat_map(& &1.all_koans())
|> Enum.count()

Agent.update(__MODULE__, fn _ -> %Tracker{total: total} end)
Expand Down
2 changes: 1 addition & 1 deletion test/executor_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule ExecuteTest do

test "stops at the first failing koan" do
{:failed, %{file: file, line: line}, SampleKoan, _name} = Execute.run_module(SampleKoan)
assert file == 'test/support/sample_koan.ex'
assert file == ~c"test/support/sample_koan.ex"
assert line == 9
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ defmodule TestHarness do
import ExUnit.Assertions

def test_all(module, answers) do
module.all_koans
module.all_koans()
|> check_answer_count(answers, module)
|> Enum.zip(answers)
|> run_all(module)
Expand Down

0 comments on commit a1218f1

Please sign in to comment.