Exception: Exception

Defined in:
lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/exception.rb

Direct Known Subclasses

Rack::ForwardRequest

Constant Summary collapse

CUCUMBER_FILTER_PATTERNS =
[
  /vendor\/rails/, 
  /vendor\/plugins\/cucumber/, 
  /vendor\/plugins\/rspec/,
  /gems\/rspec/
]

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cucumber_full_backtrace=(v) ⇒ Object



9
10
11
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/exception.rb', line 9

def self.cucumber_full_backtrace=(v)
  @@cucumber_full_backtrace = v
end

Instance Method Details

#cucumber_backtraceObject



14
15
16
17
18
19
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/exception.rb', line 14

def cucumber_backtrace
  return (backtrace || []) if @@cucumber_full_backtrace
  (backtrace || []).map {|b| b.split("\n") }.flatten.reject do |line|
    CUCUMBER_FILTER_PATTERNS.detect{|p| line =~ p}
  end.map { |line| line.strip }
end