Skip to content

Commit c80f8b6

Browse files
committed
Ensure proper error message on mix test when there is no test directory
1 parent e65dae9 commit c80f8b6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/mix/lib/mix/compilers/test.ex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ defmodule Mix.Compilers.Test do
3232
{matched_test_files, nil, []}
3333
end
3434

35+
Application.ensure_all_started(:ex_unit)
36+
3537
cond do
3638
test_files == [] ->
3739
# Make sure we run the after_suite callbacks but with no feedback

lib/mix/test/mix/tasks/test_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,9 +411,10 @@ defmodule Mix.Tasks.TestTest do
411411
test "logs test absence for a project with no test paths" do
412412
in_fixture("test_stale", fn ->
413413
File.rm_rf!("test")
414+
assert_run_output("There are no tests to run")
415+
414416
File.mkdir_p!("test")
415417
File.write!("test/test_helper.exs", "ExUnit.start()")
416-
417418
assert_run_output("There are no tests to run")
418419
end)
419420
end

0 commit comments

Comments
 (0)