Skip to content

Commit 0f7cbba

Browse files
committed
test: pin feature number in existing-spec preservation test
Without --number the run selected 002-existing, so the assertion never checked the seeded spec. Also assert the selected BRANCH_NAME. Assisted-by: Claude Code (model claude-opus-5-5, supervised)
1 parent e4dbc7a commit 0f7cbba

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/test_template_date_and_frontmatter.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,22 @@ def test_create_new_feature_preserves_dry_run_missing_template_and_existing_spec
264264
existing_dir.mkdir(parents=True)
265265
existing_bytes = b"Existing literal [DATE] must stay untouched\n"
266266
(existing_dir / "spec.md").write_bytes(existing_bytes)
267+
# Pin the feature number so the run targets the seeded 001-existing directory.
268+
number_args = ("-Number", "1") if port == "powershell" else ("--number", "1")
267269
existing_result = run(
268270
_create_feature_cmd(
269271
existing_repo,
270272
port,
271273
"Existing",
274+
*number_args,
272275
json_mode=True,
273276
allow_existing=True,
274277
short_name="existing",
275278
),
276279
existing_repo,
277280
)
278281
assert existing_result.returncode == 0, existing_result.stderr
282+
assert json_stdout(existing_result)["BRANCH_NAME"] == "001-existing"
279283
assert (existing_dir / "spec.md").read_bytes() == existing_bytes
280284

281285

0 commit comments

Comments
 (0)