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