Skip to content

Commit

Permalink
Removing deprecation message and silencing method.
Browse files Browse the repository at this point in the history
The deprecation rake task is no longer useful because the deprecated
methods have already been removed.

The method for silencing stderr has been removed since it was only
useful for `rake test:uncommitted` which was deprecated and removed.
  • Loading branch information
wangjohn committed Jun 27, 2013
1 parent f5df6e5 commit 8f1deae
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions railties/lib/rails/test_unit/testing.rake
Expand Up @@ -3,19 +3,6 @@ require 'rake/testtask'
require 'rails/test_unit/sub_test_task'
require 'active_support/deprecation'

# Recreated here from Active Support because :uncommitted needs it before Rails is available
module Kernel
remove_method :silence_stderr # Removing old method to prevent method redefined warning
def silence_stderr
old_stderr = STDERR.dup
STDERR.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
STDERR.sync = true
yield
ensure
STDERR.reopen(old_stderr)
end
end

task default: :test

desc 'Runs test:units, test:functionals, test:integration together'
Expand Down Expand Up @@ -52,11 +39,6 @@ namespace :test do
task :db => %w[db:test:prepare test:all]
end

# Display deprecation message
task :deprecated do
ActiveSupport::Deprecation.warn "`rake #{ARGV.first}` is deprecated with no replacement."
end

Rails::TestTask.new(single: "test:prepare")

["models", "helpers", "controllers", "mailers", "integration"].each do |name|
Expand Down

0 comments on commit 8f1deae

Please sign in to comment.