Skip to content

Commit 39db5a1

Browse files
author
José Valim
committed
Clean up app.start tests
1 parent 0802014 commit 39db5a1

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

lib/mix/test/mix/tasks/app.start_test.exs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ defmodule Mix.Tasks.App.StartTest do
2929
File.write!("_build/shared/lib/sample/.compile.lock", "the_past")
3030
File.touch!("_build/shared/lib/sample/.compile.lock", { { 2010, 1, 1 }, { 0, 0, 0 } })
3131

32-
Mix.Tasks.App.Start.run ["--no-start", "--no-compile"]
32+
Mix.Tasks.App.Start.run ["--no-start"]
3333
assert System.version == Mix.Deps.Lock.elixir_vsn
3434
assert File.stat!("_build/shared/lib/sample/.compile.lock").mtime > { { 2010, 1, 1 }, { 0, 0, 0 } }
3535
end
@@ -57,14 +57,10 @@ defmodule Mix.Tasks.App.StartTest do
5757
Mix.Project.push WrongElixirProject
5858

5959
in_fixture "no_mixfile", fn ->
60-
error = assert_raise Mix.ElixirVersionError, fn ->
60+
assert_raise Mix.ElixirVersionError, %r/You're trying to run :error on Elixir/, fn ->
6161
Mix.Tasks.App.Start.run ["--no-start"]
6262
end
63-
64-
assert error.message =~ %r/ to run :error /
6563
end
66-
after
67-
purge [A, B, C]
6864
end
6965

7066
test "does not validate the Elixir version requirement when disabled" do
@@ -73,7 +69,5 @@ defmodule Mix.Tasks.App.StartTest do
7369
in_fixture "no_mixfile", fn ->
7470
Mix.Tasks.App.Start.run ["--no-start", "--no-elixir-version-check"]
7571
end
76-
after
77-
purge [A, B, C]
7872
end
7973
end

lib/mix/test/mix/tasks/compile.elixir_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ defmodule Mix.Tasks.Compile.ElixirTest do
160160

161161
defmodule SourcePathsProject do
162162
def project do
163-
[ app: :source_paths, elixirc_paths: ["unknown"]]
163+
[app: :source_paths, elixirc_paths: ["unknown"]]
164164
end
165165
end
166166

lib/mix/test/mix/tasks/compile_test.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,5 @@ defmodule Mix.Tasks.CompileTest do
5555
refute File.regular?("ebin/Elixir.B.beam")
5656
refute File.regular?("ebin/Elixir.C.beam")
5757
end
58-
after
59-
purge [A, B, C]
6058
end
6159
end

0 commit comments

Comments
 (0)