// // ProfileLayoutTests.swift // MuseionTests // // #182 — the profile layout's one pinning suite. // // Scenario: A layout change is one module + one suite — From user story #182 // Given the Hermes profile layout (root, per-profile dir, .env, marker, // gateway pid, skills dir) is owned by ProfileLayout alone // When any layout fact moves (root renamed, a file renamed) // Then ProfileLayout.swift plus exactly this suite change — the provisioner, // the settings writer, and backup/restore derive every path through it and // no literal profile-root string exists outside the layout module. // import Foundation @testable import Museion import Testing @Suite("ProfileLayoutTests") struct ProfileLayoutTests { /// Pinned against LITERALS (not the layout's own inputs) so a fact change /// fails here — this suite is the layout contract of record. @Test func `root default is the hermes profiles dir`() { #expect(ProfileLayout.defaultRoot == NSHomeDirectory() + "/.hermes/profiles") } @Test func `per-profile path builders pin every layout fact`() { #expect(ProfileLayout.profileDir("museion-pass1", root: "/r") == "/r/museion-pass1") #expect(ProfileLayout.envFile(in: "/r/museion") == "/r/museion/.env") #expect(ProfileLayout.configuredMarker(in: "/r/museion") == "/r/museion/.museion-provisioned") #expect(ProfileLayout.gatewayPID(in: "/r/museion") == "/r/museion/gateway.pid") #expect(ProfileLayout.skillsDir(in: "/r/museion") == "/r/museion/skills") } }