class TestBench::Assert::Failed

Attributes

backtrace_locations[R]

Public Class Methods

build(backtrace_location=nil) click to toggle source
# File lib/test_bench/assert/failed.rb, line 10
def self.build backtrace_location=nil
  backtrace_location ||= caller_locations[0]

  new [backtrace_location]
end
new(backtrace_locations) click to toggle source
# File lib/test_bench/assert/failed.rb, line 6
def initialize backtrace_locations
  @backtrace_locations = backtrace_locations
end

Public Instance Methods

backtrace() click to toggle source
# File lib/test_bench/assert/failed.rb, line 16
def backtrace
  backtrace_locations.map(&:to_s)
end
to_s() click to toggle source
# File lib/test_bench/assert/failed.rb, line 20
def to_s
  "Assertion failed"
end