Test that pack templates take priority over extension templates.
(self, project_dir, pack_dir, temp_dir, valid_pack_data)
| 959 | assert result is None, "Disabled extension should not be picked up as unregistered" |
| 960 | |
| 961 | def test_resolve_pack_over_extension(self, project_dir, pack_dir, temp_dir, valid_pack_data): |
| 962 | """Test that pack templates take priority over extension templates.""" |
| 963 | # Create extension with templates |
| 964 | ext_dir = project_dir / ".specify" / "extensions" / "my-ext" |
| 965 | ext_templates_dir = ext_dir / "templates" |
| 966 | ext_templates_dir.mkdir(parents=True) |
| 967 | ext_template = ext_templates_dir / "spec-template.md" |
| 968 | ext_template.write_text("# Extension Spec Template\n") |
| 969 | |
| 970 | # Install a pack with the same template |
| 971 | manager = PresetManager(project_dir) |
| 972 | manager.install_from_directory(pack_dir, "0.1.5") |
| 973 | |
| 974 | resolver = PresetResolver(project_dir) |
| 975 | result = resolver.resolve("spec-template") |
| 976 | assert result is not None |
| 977 | # Pack should win over extension |
| 978 | assert "Custom Spec Template" in result.read_text() |
| 979 | |
| 980 | def test_resolve_with_source_core(self, project_dir): |
| 981 | """Test resolve_with_source for core template.""" |
nothing calls this directly
no test coverage detected