quietbacktrace 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.txt +4 -0
  2. data/README.txt +14 -5
  3. data/Rakefile +1 -1
  4. data/lib/quietbacktrace.rb +11 -4
  5. metadata +1 -1
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.7 / 2007-12-03
2
+
3
+ * Updated the README and RDocs to reflect API changes.
4
+
1
5
  == 0.0.6 / 2007-12-03
2
6
 
3
7
  * Reworked the API again.
data/README.txt CHANGED
@@ -20,17 +20,19 @@ Filters modify the output of backtrace lines.
20
20
 
21
21
  Override the defaults by adding your own backtrace_silencers:
22
22
  class Test::Unit::TestCase
23
- self.backtrace_silencers :shoulda do |line|
24
- line.include? 'vendor/plugins/shoulda'
23
+ self.new_backtrace_silencer :shoulda do |line|
24
+ line.include? 'vendor/plugins/shoulda'
25
25
  end
26
+ self.backtrace_silencers << :shoulda
26
27
  end
27
28
 
28
29
  Or your own backtrace_filters:
29
30
  class Test::Unit::TestCase
30
- self.backtrace_filters :ruby_path do |line|
31
+ self.new_backtrace_filter :ruby_path do |line|
31
32
  ruby_file_path = '/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8'
32
33
  line.slice!(0..(line =~ ruby_file_path)) if (line =~ ruby_file_path)
33
34
  end
35
+ self.backtrace_filters << :ruby_path
34
36
  end
35
37
 
36
38
  Turn Quiet Backtrace off anywhere in your test suite by setting the flag to false:
@@ -38,8 +40,15 @@ Turn Quiet Backtrace off anywhere in your test suite by setting the flag to fals
38
40
 
39
41
  == Rails-specific usage
40
42
 
41
- If you're working with Rails, you must add the built-in silencer
42
- and filter because they are not turned on by default:
43
+ Install gemsonrails, add it your Rails app, then freeze quietbacktrace:
44
+
45
+ * gem install gemsonrails
46
+ * cd rails-app-folder
47
+ * gemsonrails
48
+ * rake gems:freeze GEM=quietbacktrace
49
+
50
+ Quiet Backtrace comes with an excellent Rails-specific silencer and filter.
51
+ They must be added (usually in test_helper.rb) because they are not turned on by default:
43
52
  class Test::Unit::TestCase
44
53
  self.backtrace_silencers << :rails_vendor
45
54
  self.backtrace_filters << :rails_root
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rubygems'
4
4
  require 'hoe'
5
5
  require './lib/quietbacktrace.rb'
6
6
 
7
- Hoe.new('quietbacktrace', '0.0.6') do |p|
7
+ Hoe.new('quietbacktrace', '0.0.7') do |p|
8
8
  p.rubyforge_name = 'quietbacktrace'
9
9
  p.author = 'Dan Croak'
10
10
  p.email = 'dcroak@thoughtbot.com'
@@ -38,16 +38,23 @@
38
38
  #
39
39
  # == Rails-specific usage
40
40
  #
41
- # If you're working with Rails, you must add the built-in silencer
42
- # and filter because they are not turned on by default:
41
+ # Install gemsonrails, add it your Rails app, then freeze quietbacktrace:
42
+ #
43
+ # * gem install gemsonrails
44
+ # * cd rails-app-folder
45
+ # * gemsonrails
46
+ # * rake gems:freeze GEM=quietbacktrace
47
+ #
48
+ # Quiet Backtrace comes with an excellent Rails-specific silencer and filter.
49
+ # They must be added (usually in test_helper.rb) because they are not turned on by default:
43
50
  # class Test::Unit::TestCase
44
51
  # self.backtrace_silencers << :rails_vendor
45
52
  # self.backtrace_filters << :rails_root
46
53
  # end
47
- #
54
+ #
48
55
  # Because Quiet Backtrace works by adding attributes onto Test::Unit::TestCase,
49
56
  # you can add and remove silencers and filters at any level in your test suite,
50
- # down to the individual test.
57
+ # down to the individual test.
51
58
  #
52
59
  # == Resources
53
60
  #
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: quietbacktrace
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.6
6
+ version: 0.0.7
7
7
  date: 2007-12-03 00:00:00 -05:00
8
8
  summary: quiet_backtrace suppresses the noise in your Test::Unit backtrace. It also provides hooks for you to add additional filters.
9
9
  require_paths: