class TestBench::Controls::Error
Attributes
backtrace_locations[R]
Public Class Methods
backtrace_locations()
click to toggle source
# File lib/test_bench/controls/error.rb, line 24 def self.backtrace_locations [ BacktraceLocation.new(file, line, method_name), BacktraceLocation.new(file, line + 1, method_name), BacktraceLocation.new(file, line + 2, method_name), ] end
example()
click to toggle source
# File lib/test_bench/controls/error.rb, line 4 def self.example new backtrace_locations end
file()
click to toggle source
# File lib/test_bench/controls/error.rb, line 8 def self.file Path.example end
line()
click to toggle source
# File lib/test_bench/controls/error.rb, line 12 def self.line 1 end
message()
click to toggle source
# File lib/test_bench/controls/error.rb, line 16 def self.message 'Some error' end
method_name()
click to toggle source
# File lib/test_bench/controls/error.rb, line 20 def self.method_name 'some_method' end
new(backtrace_locations)
click to toggle source
# File lib/test_bench/controls/error.rb, line 50 def initialize backtrace_locations @backtrace_locations = backtrace_locations end
Public Instance Methods
backtrace()
click to toggle source
# File lib/test_bench/controls/error.rb, line 54 def backtrace backtrace_locations.map(&:to_s) end
to_s()
click to toggle source
# File lib/test_bench/controls/error.rb, line 58 def to_s self.class.message end