12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/bulldogger/failure_output.rb', line 12
def lines(path)
evidence = JSON.parse(File.read(path))
lines = if evidence["capture_mode"] == "missed"
["bulldogger evidence: #{path} (snapshot holds no frames)"]
elsif ApplicationFrames.available?(evidence.dig("test", "file"), evidence.fetch("frames", []))
["bulldogger evidence: #{path} (raising method is in these frames)"]
else
[missing_origin_line(path)]
end
lines << "bulldogger rerun: #{evidence['rerun_command']}" if evidence["rerun_command"]
lines
rescue JSON::ParserError, SystemCallError
["bulldogger evidence: #{path}"]
end
|