| 536 | |
| 537 | #[test] |
| 538 | fn test_ignore_rules_reload() { |
| 539 | let temp = TempDir::new().unwrap(); |
| 540 | let ignore_path = temp.path().join(".atomicignore"); |
| 541 | |
| 542 | // Start with no ignore file |
| 543 | let mut rules = IgnoreRules::load(temp.path()); |
| 544 | assert!(!rules.has_local_rules()); |
| 545 | assert!(!rules.is_ignored(Path::new("target"), true)); |
| 546 | |
| 547 | // Create ignore file |
| 548 | std::fs::write(&ignore_path, "target/\n").unwrap(); |
| 549 | |
| 550 | // Reload and verify |
| 551 | rules.reload(); |
| 552 | assert!(rules.has_local_rules()); |
| 553 | assert!(rules.is_ignored(Path::new("target"), true)); |
| 554 | } |
| 555 | |
| 556 | #[test] |
| 557 | fn test_ignore_rules_repo_root() { |