Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test warnings on Elixir 1.17 #293

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading