Class: Minitest::Queue::ErrorReport

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/queue/error_report.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ ErrorReport

Returns a new instance of ErrorReport.



45
46
47
# File 'lib/minitest/queue/error_report.rb', line 45

def initialize(data)
  @data = data
end

Class Attribute Details

.coderObject

Returns the value of attribute coder.



6
7
8
# File 'lib/minitest/queue/error_report.rb', line 6

def coder
  @coder
end

Class Method Details

.load(payload) ⇒ Object



8
9
10
# File 'lib/minitest/queue/error_report.rb', line 8

def load(payload)
  new(coder.load(payload))
end

Instance Method Details

#dumpObject



49
50
51
# File 'lib/minitest/queue/error_report.rb', line 49

def dump
  self.class.coder.dump(@data)
end

#outputObject



81
82
83
# File 'lib/minitest/queue/error_report.rb', line 81

def output
  @data[:output]
end

#test_and_module_nameObject



57
58
59
# File 'lib/minitest/queue/error_report.rb', line 57

def test_and_module_name
  @data[:test_and_module_name]
end

#test_fileObject



65
66
67
# File 'lib/minitest/queue/error_report.rb', line 65

def test_file
  @data[:test_file]
end

#test_lineObject



69
70
71
# File 'lib/minitest/queue/error_report.rb', line 69

def test_line
  @data[:test_line]
end

#test_nameObject



53
54
55
# File 'lib/minitest/queue/error_report.rb', line 53

def test_name
  @data[:test_name]
end

#test_suiteObject



61
62
63
# File 'lib/minitest/queue/error_report.rb', line 61

def test_suite
  @data[:test_suite]
end

#to_hObject



73
74
75
# File 'lib/minitest/queue/error_report.rb', line 73

def to_h
  @data
end

#to_sObject



77
78
79
# File 'lib/minitest/queue/error_report.rb', line 77

def to_s
  output
end