Permalink
Browse files

Use exclude instead of discard in the backtrace cleaner

Signed-off-by: Sam Phippen <samphippen@googlemail.com>
  • Loading branch information...
1 parent 966c6ab commit 2351e0a794bb24d21a308efd1358faca37f53d62 @samphippen committed Mar 24, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 lib/rspec/core/backtrace_cleaner.rb
@@ -3,15 +3,15 @@ module Core
class BacktraceCleaner
attr_accessor :include_patterns
- attr_accessor :discard_patterns
+ attr_accessor :exclude_patterns
- def initialize(include_patterns, discard_patterns)
+ def initialize(include_patterns, exclude_patterns)
@include_patterns = include_patterns
- @discard_patterns = discard_patterns
+ @exclude_patterns = exclude_patterns
end
def include?(line)
- matches_an_include_pattern? line or not matches_a_discard_pattern? line
+ matches_an_include_pattern? line or not matches_a_exclude_pattern? line
end
private
@@ -20,8 +20,8 @@ def matches_an_include_pattern?(line)
@include_patterns.any? {|p| line =~ p}
end
- def matches_a_discard_pattern?(line)
- @discard_patterns.any? {|p| line =~ p}
+ def matches_a_exclude_pattern?(line)
+ @exclude_patterns.any? {|p| line =~ p}
end
end
end

0 comments on commit 2351e0a

Please sign in to comment.