public
Rubygem
Description: Suppresses the noise in your Test::Unit backtraces
Homepage: http://www.thoughtbot.com/projects/quietbacktrace
Clone URL: git://github.com/thoughtbot/quietbacktrace.git
altered how vendor directory works in Rails, improved README

git-svn-id: https://svn.thoughtbot.com/gems/quiet_backtrace/trunk@19 
09e380d5-dfe7-4e7f-bb75-86e4d9cf726d
dcroak (author)
Thu Nov 29 21:27:01 -0800 2007
commit  d069cafc627e1d343c1ff37dd498a0956b7d4d0c
tree    91788a278da2721f2552c9aea070c2dd3ad96178
parent  d170278d9fc54b0d07ae926155cb94a536690931
0
...
4
5
6
7
8
9
 
 
10
 
 
 
11
12
13
...
4
5
6
 
7
 
8
9
10
11
12
13
14
15
16
0
@@ -4,10 +4,13 @@ Quiet Backtrace
0
   by Dan Croak (dcroak@thoughtbot.com, http://dancroak.com)
0
      James Golick (james@giraffesoft.ca, http://jamesgolick.com/)
0
      Joe Ferris (jferris@thoughtbot.com)
0
- with special thanks to the Boston.rb group
0
 
0
- https://svn.thoughtbot.com/gems/quiet_backtrace
0
+ Special thanks to the Boston.rb group for cultivating this idea at our inaugural hackfest.
0
+
0
   sudo gem install quiet_backtrace
0
+
0
+ svn repo: https://svn.thoughtbot.com/gems/quiet_backtrace
0
+ mailing list: http://groups.google.com/group/quiet_backtrace
0
   
0
 Quiet Backtrace suppresses the noise in your Test::Unit backtrace.
0
 It also provides hooks for you to add additional filters.
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ module QuietBacktrace
0
     self.silencers = { :test_unit => lambda { |line| (line.include?("ruby") && line.include?("/test/unit")) },
0
                        :gem_root => lambda { |line| line =~ /ruby\/gems/i },
0
                        :e1 => lambda { |line| line == "-e:1" },
0
- :rails_vendor => lambda { |line| line.include?("#{RAILS_ROOT}/vendor") if defined?(RAILS_ROOT) }
0
+ :rails_vendor => lambda { |line| (line.include?("vendor/plugins") || line.include?("vendor/gems") || line.include?("vendor/rails")) }
0
     }
0
 
0
     mattr_accessor :filters
...
71
72
73
74
 
75
76
77
...
71
72
73
 
74
75
76
77
0
@@ -71,7 +71,7 @@ class QuietBacktraceTest < Test::Unit::TestCase
0
     end
0
     
0
     should "silence any line from the RAILS_ROOT/vendor directory" do
0
- assert !@rails_quiet_backtrace.any? { |line| line.include?("#{RAILS_ROOT}/vendor") }, "One or more lines from RAILS_ROOT/vendor directory are not being silenced: #{@rails_quiet_backtrace.inspect}"
0
+ assert !@rails_quiet_backtrace.any? { |line| (line.include?("vendor/gems") || line.include?("vendor/plugins") || line.include?("vendor/rails")) }, "One or more lines from the vendor directory are not being silenced: #{@rails_quiet_backtrace.inspect}"
0
     end
0
     
0
     should "remove RAILS_ROOT text from the beginning of lines" do

Comments

    No one has commented yet.