module Oktobertest
Constants
- TestFailed
- TestSkipped
- VERSION
Public Class Methods
display_errors()
click to toggle source
# File lib/oktobertest.rb, line 7 def self.display_errors puts errors.each do |error| backtrace_location = error.backtrace_locations.detect { |l| l.base_label == '<main>' || l.base_label == '<top (required)>' } print error.kind_of?(TestSkipped) ? "\nskip" : "\nerror: #{error.message}" print "\nfile: #{backtrace_location.path}\nline: #{backtrace_location.lineno}\n" end end
errors()
click to toggle source
# File lib/oktobertest.rb, line 16 def self.errors @errors ||= [] end
exit_status()
click to toggle source
# File lib/oktobertest.rb, line 20 def self.exit_status errors.any? { |error| !error.kind_of?(TestSkipped) } ? 1 : 0 end