| 1074 | |
| 1075 | #[test] |
| 1076 | fn test_init_with_custom_view() { |
| 1077 | let temp = TempDir::new().unwrap(); |
| 1078 | let init = Init::at_path(temp.path()).with_view("main"); |
| 1079 | |
| 1080 | let result = init.run(); |
| 1081 | assert!(result.is_ok()); |
| 1082 | |
| 1083 | // Verify view was created (by checking current_stack file) |
| 1084 | let current_stack_path = temp.path().join(".atomic").join("current_stack"); |
| 1085 | if current_stack_path.exists() { |
| 1086 | let content = std::fs::read_to_string(current_stack_path).unwrap(); |
| 1087 | assert!(content.contains("main")); |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | #[test] |
| 1092 | fn test_init_with_kind_creates_ignore_file() { |