@@ -719,8 +719,8 @@ defmodule Mix.Tasks.TestTest do
719719  describe  "--dry-run"  do 
720720    test  "works with --stale"  do 
721721      in_fixture ( "test_stale" ,  fn  -> 
722-         File . write! ( "test/dry_run_test_stale .exs" ,  """ 
723-         defmodule DryRunTest  do 
722+         File . write! ( "test/dry_run_one_test_stale .exs" ,  """ 
723+         defmodule DryRunOneTest  do 
724724          use ExUnit.Case 
725725
726726          test "new test" do 
@@ -729,11 +729,29 @@ defmodule Mix.Tasks.TestTest do
729729        end 
730730        """ ) 
731731
732+         File . write! ( "test/dry_run_two_test_stale.exs" ,  """ 
733+         defmodule DryRunTwoTest do 
734+           use ExUnit.Case 
735+ 
736+           @tag :skip 
737+           test "skipped test" do 
738+             assert true 
739+           end 
740+         end 
741+         """ ) 
742+ 
732743        output  =  mix ( [ "test" ,  "--dry-run" ,  "--stale" ] ) 
733744
734-         assert  output  =~  "Test dry run:" 
735-         assert  output  =~  "test/dry_run_test_stale.exs:4" 
736-         assert  output  =~  "0 tests, 0 failures (dry run)" 
745+         assert  output  =~  "Tests that would be executed:" 
746+         assert  output  =~  "test/a_test_stale.exs:4" 
747+         assert  output  =~  "test/b_test_stale.exs:4" 
748+         assert  output  =~  "test/dry_run_one_test_stale.exs:4" 
749+         refute  output  =~  "test/dry_run_two_test_stale.exs:5" 
750+         assert  output  =~  "1 test, 0 failures, 1 skipped" 
751+ 
752+         # Tests are still marked as stale 
753+         output  =  mix ( [ "test" ,  "--dry-run" ,  "--stale" ] ) 
754+         assert  output  =~  "1 test, 0 failures, 1 skipped" 
737755      end ) 
738756    end 
739757
@@ -742,9 +760,14 @@ defmodule Mix.Tasks.TestTest do
742760        _initial_run  =  mix ( [ "test" ] ) 
743761        output  =  mix ( [ "test" ,  "--dry-run" ,  "--failed" ] ) 
744762
745-         assert  output  =~  "Test dry run:" 
763+         assert  output  =~  "Tests that would be executed:" 
764+         assert  output  =~  "test/only_failing_test_failed.exs:4" 
746765        assert  output  =~  "test/passing_and_failing_test_failed.exs:5" 
747-         assert  output  =~  "0 tests, 0 failures (dry run)" 
766+         assert  output  =~  "0 tests, 0 failures" 
767+ 
768+         # Tests are still marked as failed 
769+         output  =  mix ( [ "test" ,  "--dry-run" ,  "failed" ] ) 
770+         assert  output  =~  "0 tests, 0 failures" 
748771      end ) 
749772    end 
750773  end 
0 commit comments