Each emitted .mdc has only the three allowed frontmatter keys.
(self, synthetic_plugin: PluginSource, output_root: Path)
| 512 | assert manifest["author"] == {"name": "Jane Doe", "email": "jane@example.com"} |
| 513 | |
| 514 | def test_curated_rules_validate(self, synthetic_plugin: PluginSource, output_root: Path): |
| 515 | """Each emitted .mdc has only the three allowed frontmatter keys.""" |
| 516 | adapter = CursorAdapter(output_root=output_root) |
| 517 | adapter.emit_global([synthetic_plugin]) |
| 518 | rules_dir = output_root / ".cursor" / "rules" |
| 519 | assert rules_dir.is_dir() |
| 520 | for mdc in rules_dir.glob("*.mdc"): |
| 521 | content = mdc.read_text() |
| 522 | fm, _ = parse_frontmatter(content) |
| 523 | invalid = set(fm.keys()) - {"description", "globs", "alwaysApply"} |
| 524 | assert not invalid, f"{mdc}: unexpected keys {invalid}" |
| 525 | |
| 526 | def test_mdc_validator_handles_block_scalar(self, tmp_path: Path): |
| 527 | """A description: > block scalar with colons in body must NOT yield phantom keys.""" |
nothing calls this directly
no test coverage detected