Skip to content

Commit

Permalink
Merge pull request #210 from Shopify/rwstauner/format-seconds
Browse files Browse the repository at this point in the history
Make seconds fraction optional when normalizing test output
  • Loading branch information
rwstauner committed May 8, 2023
2 parents 3fed73b + 8f28c2a commit 9e3ae70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ruby/test/support/output_test_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def strip_heredoc(heredoc)
end

def freeze_timing(output)
output.to_s.gsub(/\d+\.\d+s/, 'X.XXs').gsub(/ \d+\.\d+ seconds /, ' X.XXXXX seconds ')
output.to_s.gsub(/\d+\.\d+s/, 'X.XXs').gsub(/ \d+(\.\d+)? seconds /, ' X.XXXXX seconds ')
end

def freeze_seed(output)
Expand Down

0 comments on commit 9e3ae70

Please sign in to comment.