aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorGuo Xiang Tan <tgx_world@hotmail.com>2014-12-02 01:31:06 +0800
committerGuo Xiang Tan <tgx_world@hotmail.com>2014-12-02 18:47:03 +0800
commit106db0b419ede5bea7b93a9eb76ce6aa578b99b2 (patch)
tree04c996bc8d4bed5b99080ccfec2e43e024a34512 /railties/lib
parent72f4c7af10b7fed88604f73f13d5e66046d38fbd (diff)
downloadrails-106db0b419ede5bea7b93a9eb76ce6aa578b99b2.tar.gz
rails-106db0b419ede5bea7b93a9eb76ce6aa578b99b2.tar.bz2
rails-106db0b419ede5bea7b93a9eb76ce6aa578b99b2.zip
Silence Minitest for plugin tests.
Fixes https://github.com/rails/rails/issues/17340. Use Minitest::BacktraceFilter instead of removing all silencers. This will allow the backtrace for all libraries in the plugin to be shown while removing noise generated by Minitest's backtrace.
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb
index d492e68357..bf3da1fc4d 100644
--- a/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb
+++ b/railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb
@@ -10,7 +10,9 @@ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate',
<% end -%>
require "rails/test_help"
-Rails.backtrace_cleaner.remove_silencers!
+# Filter out Minitest backtrace while allowing backtrace from other libraries
+# to be shown.
+Minitest.backtrace_filter = Minitest::BacktraceFilter.new
# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }