Class: Spec::Runner::QuietBacktraceTweaker
- Inherits:
-
BacktraceTweaker
- Object
- BacktraceTweaker
- Spec::Runner::QuietBacktraceTweaker
- Defined in:
- lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb
Overview
Tweaks raised Exceptions to mask noisy (unneeded) parts of the backtrace
Constant Summary collapse
- IGNORE_PATTERNS =
spec_files + [ /\/rspec-[^\/]*\/lib\/spec\//, /\/spork-[^\/]*\/lib\/spork\//, /\/lib\/ruby\//, /bin\/spec:/, /bin\/spork:/, /bin\/rcov:/, /lib\/rspec-rails/, /vendor\/rails/, # TextMate's Ruby and RSpec plugins /Ruby\.tmbundle\/Support\/tmruby.rb:/, /RSpec\.tmbundle\/Support\/lib/, /temp_textmate\./, /mock_frameworks\/rspec/, /spec_server/ ]
Instance Method Summary collapse
- #ignore_patterns(*patterns) ⇒ Object
- #ignored_patterns ⇒ Object
-
#initialize(*patterns) ⇒ QuietBacktraceTweaker
constructor
A new instance of QuietBacktraceTweaker.
Methods inherited from BacktraceTweaker
#clean_up_double_slashes, #tweak_backtrace
Constructor Details
#initialize(*patterns) ⇒ QuietBacktraceTweaker
Returns a new instance of QuietBacktraceTweaker.
63 64 65 66 |
# File 'lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb', line 63 def initialize(*patterns) super ignore_patterns(*patterns) end |
Instance Method Details
#ignore_patterns(*patterns) ⇒ Object
68 69 70 |
# File 'lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb', line 68 def ignore_patterns(*patterns) @ignore_patterns += patterns.flatten.map { |pattern| Regexp.new(pattern) } end |
#ignored_patterns ⇒ Object
72 73 74 |
# File 'lib/vendor/plugins/rspec/lib/spec/runner/backtrace_tweaker.rb', line 72 def ignored_patterns IGNORE_PATTERNS + @ignore_patterns end |