   if ProcessInfo().environment["GENERATE_CONTEXTS"] == "YES" {
     let target = Path(#file).parent().parent() + "Fixtures/StencilContexts" + directory.rawValue + fileName
     do {
-      try YAML.write(object: result, to: target)
+      try YAML.write(object: result.convertedToContext(), to: target)
     } catch let error {
       fatalError("Unable to write context file \(target): \(error)")
     }

  }
}

func XCTDiffContexts(
  _ result: [String: Any],
  expected name: String,

    XCTFail(error, file: file, line: line)
  }
}

// MARK: Safe access to fixtures

class Fixtures {
  enum Directory: String {
