I have many rspecs showing the duration of several test examples. These
rspec fils are in an HTML format. I want to be able to grab the
durations and htmls and write to a textfile. However I can not figure
out how to pull the 1 line from the html. When I use puts it shows the
whole html. Will you help me grab one line out of the html?
Here is my snippet.
Dir[“C:/Respecs/*.html”].each do |htmlfile|
readhtml = File.read(htmlfile)
if readhtml.include?(“seconds”) == true
htmlbase = File.basename(htmlfile)
puts htmlbase #<–shows full html file not just the line that
“seconds” is located on.