(t *testing.T)
| 139 | } |
| 140 | |
| 141 | func TestProjectInit_NoAgentFlag(t *testing.T) { |
| 142 | tmpDir := t.TempDir() |
| 143 | resetProjectInitFlags(tmpDir) |
| 144 | projectInitNoAgent = true |
| 145 | |
| 146 | err := runProjectInit(projectInitCmd, []string{}) |
| 147 | if err != nil { |
| 148 | t.Fatalf("unexpected error: %v", err) |
| 149 | } |
| 150 | |
| 151 | // Should create TASKMD_SPEC.md |
| 152 | specPath := filepath.Join(tmpDir, specFilename) |
| 153 | if _, err := os.Stat(specPath); os.IsNotExist(err) { |
| 154 | t.Error("TASKMD_SPEC.md should have been created") |
| 155 | } |
| 156 | |
| 157 | // Should NOT create CLAUDE.md |
| 158 | claudePath := filepath.Join(tmpDir, "CLAUDE.md") |
| 159 | if _, err := os.Stat(claudePath); err == nil { |
| 160 | t.Error("CLAUDE.md should not have been created with --no-agent") |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | func TestProjectInit_NoSpecAndNoAgentAndNoTemplatesIsError(t *testing.T) { |
| 165 | tmpDir := t.TempDir() |
nothing calls this directly
no test coverage detected