| 958 | |
| 959 | #[test] |
| 960 | fn test_init_with_custom_view() { |
| 961 | let temp = TempDir::new().unwrap(); |
| 962 | let init = Init::at_path(temp.path()).with_view("main"); |
| 963 | |
| 964 | let result = init.run(); |
| 965 | assert!(result.is_ok()); |
| 966 | |
| 967 | // Verify view was created (by checking current_stack file) |
| 968 | let current_stack_path = temp.path().join(".atomic").join("current_stack"); |
| 969 | if current_stack_path.exists() { |
| 970 | let content = std::fs::read_to_string(current_stack_path).unwrap(); |
| 971 | assert!(content.contains("main")); |
| 972 | } |
| 973 | } |
| 974 | |
| 975 | #[test] |
| 976 | fn test_init_with_kind_creates_ignore_file() { |