()
| 266 | |
| 267 | #[test] |
| 268 | fn test_clean() { |
| 269 | File::create(&temp_file()).unwrap(); |
| 270 | let exercise = Exercise { |
| 271 | name: String::from("example"), |
| 272 | path: PathBuf::from("tests/fixture/state/pending_exercise.rs"), |
| 273 | mode: Mode::Compile, |
| 274 | hint: String::from(""), |
| 275 | }; |
| 276 | let compiled = exercise.compile().unwrap(); |
| 277 | drop(compiled); |
| 278 | assert!(!Path::new(&temp_file()).exists()); |
| 279 | } |
| 280 | |
| 281 | #[test] |
| 282 | fn test_pending_state() { |