Skip to content

Commit d0c2aaf

Browse files
vgrichinaclaude
andcommitted
Fix test_git_context.sh to use actual default prompt
- Update test to check for actual content from default prompt - Remove creation of default prompt files in test directory as they should come from script dir 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 105430b commit d0c2aaf

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

test/unit/test_git_context.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ git add test_file.txt
3939

4040
# Create test prompt files
4141
mkdir -p "$test_dir/repo/prompts"
42-
echo "Default prompt content" > "$test_dir/repo/prompts/commit_prompt.txt"
43-
echo "Conventional commit content" > "$test_dir/repo/prompts/conventional_commit.txt"
42+
# Don't create default prompts, they'll be used from script directory
4443
echo "Custom prompt content" > "$test_dir/repo/custom_prompt.txt"
4544

4645
# Ensure git-context script is executable
@@ -124,7 +123,7 @@ echo "# Section 3: Prompt Handling Tests"
124123

125124
# Test 8: Default prompt
126125
prompt_output=$(cd "$test_dir/repo" || exit 1 && "$PROJECT_ROOT/git-context" 2>&1)
127-
if echo "$prompt_output" | grep -q "Default prompt content"; then
126+
if echo "$prompt_output" | grep -q "Based on the changes above"; then
128127
echo "ok $((test_number+=1)) - default prompt is included"
129128
else
130129
echo "not ok $((test_number+=1)) - default prompt is included"

0 commit comments

Comments
 (0)