Skip to content

Commit

Permalink
Capture print statements from the test
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanKotov committed Aug 28, 2022
1 parent 0e94041 commit d28926d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/mix/tasks_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ defmodule Mix.Tasks.CoverallsTest do
end

test_with_mock "doesn't pass through coveralls args", Runner, [run: fn(_, _) -> nil end] do
Mix.Tasks.Coveralls.run(["--include", "remote", "-x", "--unknown", "value", "--verbose", "-u", "--filter", "x"])
assert(called Runner.run("test", ["--cover", "--include", "remote", "-x", "--unknown", "value"]))
capture_io(fn ->
Mix.Tasks.Coveralls.run(["--include", "remote", "-x", "--unknown", "value", "--verbose", "-u", "--filter", "x"])
assert(called Runner.run("test", ["--cover", "--include", "remote", "-x", "--unknown", "value"]))
end)
end

test_with_mock "detail", Runner, [run: fn(_, _) -> nil end] do
Expand Down

0 comments on commit d28926d

Please sign in to comment.