MCPcopy Create free account
hub / github.com/driangle/taskmd / TestProjectInit_GeminiFlag

Function TestProjectInit_GeminiFlag

apps/cli/internal/cli/project_init_test.go:65–96  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestProjectInit_GeminiFlag(t *testing.T) {
66 tmpDir := t.TempDir()
67 resetProjectInitFlags(tmpDir)
68 projectInitGemini = true
69
70 err := runProjectInit(projectInitCmd, []string{})
71 if err != nil {
72 t.Fatalf("unexpected error: %v", err)
73 }
74
75 // Should create GEMINI.md
76 geminiPath := filepath.Join(tmpDir, "GEMINI.md")
77 content, err := os.ReadFile(geminiPath)
78 if err != nil {
79 t.Fatalf("failed to read GEMINI.md: %v", err)
80 }
81 if !bytes.Equal(content, geminiTemplate) {
82 t.Error("GEMINI.md content does not match template")
83 }
84
85 // Should create TASKMD_SPEC.md
86 specPath := filepath.Join(tmpDir, specFilename)
87 if _, err := os.Stat(specPath); os.IsNotExist(err) {
88 t.Error("TASKMD_SPEC.md should have been created")
89 }
90
91 // Should NOT create CLAUDE.md
92 claudePath := filepath.Join(tmpDir, "CLAUDE.md")
93 if _, err := os.Stat(claudePath); err == nil {
94 t.Error("CLAUDE.md should not have been created when --gemini is specified")
95 }
96}
97
98func TestProjectInit_MultipleAgentFlags(t *testing.T) {
99 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 3

resetProjectInitFlagsFunction · 0.85
runProjectInitFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected