Skip to content

Commit a1ee3a2

Browse files
Make stacktrace test conditional on Elixir version (#603)
1 parent c994b85 commit a1ee3a2

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

test/ecto/migrator_test.exs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,17 +406,20 @@ defmodule Ecto.MigratorTest do
406406
end
407407
end
408408

409-
test "warns for .ex files that look like migrations" do
410-
in_tmp(fn path ->
411-
output =
412-
capture_io(:stderr, fn ->
413-
create_migration("123_looks_like_migration.ex")
414-
assert run(TestRepo, path, :up, all: true, log: false) == []
415-
end)
409+
# TODO: Remove when we require Elixir 1.14
410+
if Version.match?(System.version(), ">= 1.14.0") do
411+
test "warns for .ex files that look like migrations" do
412+
in_tmp(fn path ->
413+
output =
414+
capture_io(:stderr, fn ->
415+
create_migration("123_looks_like_migration.ex")
416+
assert run(TestRepo, path, :up, all: true, log: false) == []
417+
end)
416418

417-
assert output =~ "file looks like a migration but ends in .ex"
418-
assert output =~ "123_looks_like_migration.ex"
419-
end)
419+
assert output =~ "file looks like a migration but ends in .ex"
420+
assert output =~ "123_looks_like_migration.ex"
421+
end)
422+
end
420423
end
421424

422425
describe "lock for migrations" do

0 commit comments

Comments
 (0)