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