Permalink
Browse files

Silence warning when loading to test deprecated features

  • Loading branch information...
1 parent 164bd2f commit 6816aae6827f3370ee593b6d69038b25874b3069 @drbrain drbrain committed Jun 23, 2011
Showing with 5 additions and 3 deletions.
  1. +5 −3 test/test_rake_rdoc_task.rb
@@ -1,10 +1,12 @@
require File.expand_path('../helper', __FILE__)
begin
- old_verbose = $VERBOSE
- $VERBOSE = nil
+ old_stderr = $stderr
+ dev_null = File.exist?('/dev/null') ? '/dev/null' : 'NUL'
+ $stderr = open dev_null, 'w'
require 'rake/rdoctask'
ensure
- $VERBOSE = old_verbose
+ $stderr.close
+ $stderr = old_stderr
end
class TestRakeRDocTask < Rake::TestCase

0 comments on commit 6816aae

Please sign in to comment.