Skip to content

Commit

Permalink
Fix spec runner - we only want the last line for json parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
CKolkey committed Sep 30, 2024
1 parent d860154 commit cd8a00e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/specs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ gemfile do
gem "open3"
gem "tty-spinner"
gem "pastel"
gem "debug"
end

COLOR = Pastel.new
Expand Down Expand Up @@ -54,7 +55,8 @@ Sync do |parent|
stdin, stdout, wait = Open3.popen2({ "CI" => "1" }, "bundle exec rspec #{test} --format json --order random")
stdin.close

results[test] = JSON.parse(stdout.read)
output = stdout.read.lines.last
results[test] = JSON.parse(output)
stdout.close

time = print_time(results[test].dig("summary", "duration").round(3))
Expand Down

0 comments on commit cd8a00e

Please sign in to comment.