Permalink
Browse files

updating README to use markdown

  • Loading branch information...
1 parent 5125585 commit dd4b86ff2a6547a7865aa672439b5652568b0abb @croaky croaky committed Jun 7, 2008
Showing with 94 additions and 21 deletions.
  1. +0 −21 README
  2. +94 −0 README.markdown
View
21 README
@@ -1,21 +0,0 @@
-Quiet Backtrace
-===============
-
- by Dan Croak (dcroak@thoughtbot.com, http://dancroak.com)
- James Golick (james@giraffesoft.ca, http://jamesgolick.com/)
- Joe Ferris (jferris@thoughtbot.com)
-
- Special thanks to the Boston.rb group for cultivating this idea at our inaugural hackfest.
-
- sudo gem install quietbacktrace
-
- svn repo: https://svn.thoughtbot.com/gems/quiet_backtrace
- mailing list: http://groups.google.com/group/quiet_backtrace
-
-Quiet Backtrace suppresses the noise in your Test::Unit backtrace.
-It also provides hooks for you to add additional filters.
-
-It requires Test::Unit.
-
-Copyright (c) 2007 Dan Croak, James Golick, Joe Ferris, thoughtbot, inc.,
-released under the MIT license
View
@@ -0,0 +1,94 @@
+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 quietbacktrace
+
+Usage
+-----
+
+Quiet Backtrace works by adding new attributes to Test::Unit::TestCase.
+By default, their values are:
+
+ self.quiet_backtrace = true
+ self.backtrace_silencers = [:test_unit, :gem_root, :e1]
+ self.backtrace_filters = [:method_name]
+
+Silencers remove lines from the backtrace that return true for given conditions.
+Filters modify the output of backtrace lines.
+
+Override the defaults by adding your own backtrace_silencers:
+
+ class Test::Unit::TestCase
+ self.new_backtrace_silencer :shoulda do |line|
+ line.include? 'vendor/plugins/shoulda'
+ end
+ self.backtrace_silencers << :shoulda
+ end
+
+Or your own backtrace_filters:
+
+ class Test::Unit::TestCase
+ self.new_backtrace_filter :ruby_path do |line|
+ ruby_file_path = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8'
+ line.slice!(0..(line =~ ruby_file_path)) if (line =~ ruby_file_path)
+ end
+ self.backtrace_filters << :ruby_path
+ end
+
+Turn Quiet Backtrace off anywhere in your test suite by setting the flag to false:
+
+ Test::Unit::TestCase.quiet_backtrace = false
+
+Rails-specific usage
+--------------------
+
+Install the gem and add it your Rails app:
+
+* gem install thoughtbot-quietbacktrace --source http://gems.github.com
nbibler
nbibler Jul 11, 2008

GitHub doesn’t appear to recognize a gemspec for the project:

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

> ERROR: could not find thoughtbot-quietbacktrace locally or in a repository

+* cd vendor/gems
+* gem unpack quietbacktrace
+
+Quiet Backtrace comes with an excellent Rails-specific silencer and filter.
+They must be added (usually in test_helper.rb) because they are not turned on by default:
+
+ class Test::Unit::TestCase
+ self.backtrace_silencers << :rails_vendor
+ self.backtrace_filters << :rails_root
+ end
+
+Because Quiet Backtrace works by adding attributes onto Test::Unit::TestCase,
+you can add and remove silencers and filters at any level in your test suite,
+down to the individual test.
+
+Requirements
+------------
+
+* Test::Unit
+* aliasing.rb and attribute_accessors.rb, which are sniped from ActiveSupport and
+ are included in the gem. They allow quietbacktrace.rb to use alias method chain,
+ cattr accessor, and mattr accessor.
+
+Resources
+---------
+
+* [mailing list](http://groups.google.com/group/quiet_backtrace)
+* [project site](http://rubyforge.org/projects/quietbacktrace)
+
+Authors
+-------
+
+* [Dan Croak](http://dancroak.com)
+* [James Golick](http://jamesgolick.com/)
+* [Joe Ferris](jferris@thoughtbot.com)
+
+Special thanks to the [Boston.rb group](http://bostonrb.org)
+for cultivating this idea at our inaugural hackfest.
+
+Copyright (c) Dan Croak, James Golick, Joe Ferris, thoughtbot, inc.
+(the MIT license)

0 comments on commit dd4b86f

Please sign in to comment.