aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-05 20:11:03 -0700
committerRafael Mendonça França <rafaelmfranca@gmail.com>2012-10-05 20:11:03 -0700
commit639efb93135c765dcf5c4aa09c30a8b4973c8421 (patch)
tree0ba7de36e6ebdb66050b82f27eff655398954811
parent62aff55706e4a245080440343730a315be423628 (diff)
parentd91bee80beae4e92b2b015599771310cebc3a143 (diff)
downloadrails-639efb93135c765dcf5c4aa09c30a8b4973c8421.tar.gz
rails-639efb93135c765dcf5c4aa09c30a8b4973c8421.tar.bz2
rails-639efb93135c765dcf5c4aa09c30a8b4973c8421.zip
Merge pull request #7861 from frodsan/test_backtrace
use Rails backtrace in tests
-rw-r--r--activesupport/activesupport.gemspec2
-rw-r--r--activesupport/lib/active_support/backtrace_cleaner.rb1
-rw-r--r--railties/lib/rails/test_help.rb4
3 files changed, 6 insertions, 1 deletions
diff --git a/activesupport/activesupport.gemspec b/activesupport/activesupport.gemspec
index fbe82c3de5..30f4ded005 100644
--- a/activesupport/activesupport.gemspec
+++ b/activesupport/activesupport.gemspec
@@ -22,5 +22,5 @@ Gem::Specification.new do |s|
s.add_dependency('i18n', '~> 0.6')
s.add_dependency('multi_json', '~> 1.3')
s.add_dependency('tzinfo', '~> 0.3.33')
- s.add_dependency('minitest', '~> 4.0')
+ s.add_dependency('minitest', '~> 4.1')
end
diff --git a/activesupport/lib/active_support/backtrace_cleaner.rb b/activesupport/lib/active_support/backtrace_cleaner.rb
index 53d05c3817..47898f8047 100644
--- a/activesupport/lib/active_support/backtrace_cleaner.rb
+++ b/activesupport/lib/active_support/backtrace_cleaner.rb
@@ -45,6 +45,7 @@ module ActiveSupport
filtered
end
end
+ alias :filter :clean
# Adds a filter from the block provided. Each line in the backtrace will be
# mapped against this filter.
diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb
index 581ceaf9ce..aa357dc418 100644
--- a/railties/lib/rails/test_help.rb
+++ b/railties/lib/rails/test_help.rb
@@ -7,6 +7,10 @@ require 'active_support/test_case'
require 'action_controller/test_case'
require 'action_dispatch/testing/integration'
+# Config Rails backtrace in tests.
+require 'rails/backtrace_cleaner'
+MiniTest.backtrace_filter = Rails.backtrace_cleaner
+
# Enable turn if it is available
begin
require 'turn'