lib/atp/formatters/datalog.rb in atp-0.3.3 vs lib/atp/formatters/datalog.rb in atp-0.4.0
- old
+ new
@@ -19,11 +19,16 @@
if node.find(:failed)
str += 'FAIL'.ljust(9).red
else
str += 'PASS'.ljust(9)
end
- str += "#{node.find(:name).value}".ljust(55)
- str += "#{node.find(:object).value}".ljust(55)
+ if n = node.find(:name)
+ name = n.value
+ else
+ name = node.find(:object).value['Test']
+ end
+ str += "#{name}".ljust(55)
+ str += "#{node.find(:object).value['Test']}".ljust(55)
str += "#{node.find(:id).value}"
puts str
end
def on_render(node)