Skip to content
  • Lin Jen-Shin's avatar
    aa149a61
    Install activesupport for verify-tests-metadata · aa149a61
    Lin Jen-Shin authored
    The same idea is used in
    !110018
    
    We still use
    `Gitlab::RspecFlaky::Report.load(flaky_report_path).flaky_examples.to_h`
    because it does the following, which is more than just `JSON.parse`:
    
    * `JSON.parse`
    * Check if the parsed JSON is a `Hash`: `collection.is_a?(Hash)` and the
      values can also be converted to be a hash `example.to_h`
    * `Time.parse(attributes[attr]) if attributes[attr].is_a?(String)` where
      `attr` is `first_flaky_at` and `last_flaky_at`, and `attributes` is
      `example.to_h`
    aa149a61
    Install activesupport for verify-tests-metadata
    Lin Jen-Shin authored
    The same idea is used in
    !110018
    
    We still use
    `Gitlab::RspecFlaky::Report.load(flaky_report_path).flaky_examples.to_h`
    because it does the following, which is more than just `JSON.parse`:
    
    * `JSON.parse`
    * Check if the parsed JSON is a `Hash`: `collection.is_a?(Hash)` and the
      values can also be converted to be a hash `example.to_h`
    * `Time.parse(attributes[attr]) if attributes[attr].is_a?(String)` where
      `attr` is `first_flaky_at` and `last_flaky_at`, and `attributes` is
      `example.to_h`
Loading