Skip to content

Commit b1456ef

Browse files
committed
Update CLI tests for .peas.toml and TOML config syntax
1 parent 1863b0e commit b1456ef

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

tests/cli_tests.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ fn test_init_creates_config() {
5858
.success()
5959
.stdout(predicate::str::contains("Initialized"));
6060

61-
assert!(temp_dir.path().join(".peas.yml").exists());
61+
assert!(temp_dir.path().join(".peas.toml").exists());
6262
assert!(temp_dir.path().join(".peas").exists());
6363
}
6464

@@ -72,7 +72,7 @@ fn test_init_with_custom_prefix() {
7272
.assert()
7373
.success();
7474

75-
let config = std::fs::read_to_string(temp_dir.path().join(".peas.yml")).unwrap();
75+
let config = std::fs::read_to_string(temp_dir.path().join(".peas.toml")).unwrap();
7676
assert!(config.contains("myapp-"));
7777
}
7878

@@ -502,9 +502,9 @@ fn test_yaml_frontmatter_config() {
502502
.success();
503503

504504
// Switch config to YAML
505-
let config_path = temp_dir.path().join(".peas.yml");
505+
let config_path = temp_dir.path().join(".peas.toml");
506506
let config = std::fs::read_to_string(&config_path).unwrap();
507-
let updated_config = config.replace("frontmatter: toml", "frontmatter: yaml");
507+
let updated_config = config.replace("frontmatter = \"toml\"", "frontmatter = \"yaml\"");
508508
std::fs::write(&config_path, updated_config).unwrap();
509509

510510
let output = peas_cmd()
@@ -559,9 +559,9 @@ fn test_toml_frontmatter_preserved_on_update() {
559559
let id = json["id"].as_str().unwrap();
560560

561561
// Switch config to YAML
562-
let config_path = temp_dir.path().join(".peas.yml");
562+
let config_path = temp_dir.path().join(".peas.toml");
563563
let config = std::fs::read_to_string(&config_path).unwrap();
564-
let updated_config = config.replace("frontmatter: toml", "frontmatter: yaml");
564+
let updated_config = config.replace("frontmatter = \"toml\"", "frontmatter = \"yaml\"");
565565
std::fs::write(&config_path, updated_config).unwrap();
566566

567567
// Update the pea - should preserve TOML format
@@ -601,9 +601,9 @@ fn test_yaml_frontmatter_preserved_on_update() {
601601
.success();
602602

603603
// Switch config to YAML
604-
let config_path = temp_dir.path().join(".peas.yml");
604+
let config_path = temp_dir.path().join(".peas.toml");
605605
let config = std::fs::read_to_string(&config_path).unwrap();
606-
let yaml_config = config.replace("frontmatter: toml", "frontmatter: yaml");
606+
let yaml_config = config.replace("frontmatter = \"toml\"", "frontmatter = \"yaml\"");
607607
std::fs::write(&config_path, &yaml_config).unwrap();
608608

609609
let output = peas_cmd()

0 commit comments

Comments
 (0)