diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-02 11:48:52 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-12-02 11:48:52 -0200 |
commit | fc32d02b08f09270bd9fe5a7d17cf0665786c787 (patch) | |
tree | d3ca47c7c626e3f57879e46d944acb664cbc4c8c | |
parent | 921576b1d946b2aa2713aec6d58c8a557b24607f (diff) | |
parent | 106db0b419ede5bea7b93a9eb76ce6aa578b99b2 (diff) | |
download | rails-fc32d02b08f09270bd9fe5a7d17cf0665786c787.tar.gz rails-fc32d02b08f09270bd9fe5a7d17cf0665786c787.tar.bz2 rails-fc32d02b08f09270bd9fe5a7d17cf0665786c787.zip |
Merge pull request #17867 from tgxworld/silence_minitest_plugins
Silence Minitest for plugin tests.
-rw-r--r-- | railties/lib/rails/generators/rails/plugin/templates/test/test_helper.rb | 4 | ||||
-rw-r--r-- | railties/test/generators/plugin_generator_test.rb | 1 |
2 files changed, 4 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 } diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 4329c6e1a4..dbc87be614 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -57,6 +57,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase assert_file "test/test_helper.rb" do |content| assert_match(/require.+test\/dummy\/config\/environment/, content) assert_match(/ActiveRecord::Migrator\.migrations_paths.+test\/dummy\/db\/migrate/, content) + assert_match(/Minitest\.backtrace_filter = Minitest::BacktraceFilter\.new/, content) end assert_file "test/bukkits_test.rb", /assert_kind_of Module, Bukkits/ end |