Repository is archived
No commit activity in last 3 years
No release in over 3 years
Quiet Backtrace suppresses the noise in your Test::Unit backtrace. It also provides hooks for you to add additional silencers and filters.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

DEPRECATED

Thoughtbot is no longer supporting this project, it hasn't be tested or used since at least Rails 2.x.

We recommend upgrading to Rails 3 as soon as possible, since this gem's functionality was merged into Rails a while ago.

Quiet Backtrace

Quiet Backtrace suppresses the noise in your Test::Unit backtrace. It also provides hooks for you to add additional silencers and filters.

Install

sudo gem install thoughtbot-quietbacktrace --source=http://gems.github.com

Usage

Silencers remove lines from the backtrace. Create your own:

# Will reject all lines that include the word "mongrel", 
# like "/gems/mongrel/server.rb" or "/app/my_mongrel_server/rb"
backtrace_cleaner = QuietBacktrace::BacktraceCleaner.new
backtrace_cleaner.add_silencer { |line| line =~ /mongrel/ }

Filters modify the output of backtrace lines. Create your own:

# Will turn "/my/rails/root/app/models/person.rb" into "/app/models/person.rb"
backtrace_cleaner = QuietBacktrace::BacktraceCleaner.new
backtrace_cleaner.add_filter { |line| line.gsub(Rails.root, '') }

Requirements

  • Test::Unit

Resources

Authors

Special thanks to the Boston.rb group for cultivating this idea at our inaugural hackfest.

Copyright (c) Dan Croak, James Golick, Joe Ferris, thoughtbot, inc. (the MIT license)