diff --git a/test/test_trace_output.rb b/test/test_trace_output.rb
index <HASH>..<HASH> 100644
--- a/test/test_trace_output.rb
+++ b/test/test_trace_output.rb
@@ -41,13 +41,17 @@ class TestTraceOutput < Rake::TestCase # :nodoc:
   end
 
   def test_trace_issues_single_io_for_args_multiple_strings_and_alternate_sep
+    verbose, $VERBOSE = $VERBOSE, nil
     old_sep = $\
     $\ = "\r"
+    $VERBOSE = verbose
     spy = PrintSpy.new
     trace_on(spy, "HI\r", "LO")
     assert_equal "HI\rLO\r", spy.result
     assert_equal 1, spy.calls
   ensure
+    $VERBOSE = nil
     $\ = old_sep
+    $VERBOSE = verbose
   end
 end
Suppress deprecation warning for $\ since ruby <I>