thoughtbot / quietbacktrace
- Source
- Commits
- Network (2)
- Issues (0)
- Downloads (0)
- Wiki (3)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Mar 01 09:51:13 -0800 2009 | |
| |
MIT-LICENSE | ||
| |
README.markdown | Thu Mar 26 11:29:33 -0700 2009 | |
| |
Rakefile | Fri Jun 26 08:26:36 -0700 2009 | |
| |
lib/ | Fri Jun 26 08:21:47 -0700 2009 | |
| |
quietbacktrace.gemspec | Fri Jun 26 08:26:36 -0700 2009 | |
| |
test/ | Fri Jun 26 08:21:47 -0700 2009 |
README.markdown
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)

