create_dir_all(&source_dir).expect("Could not create source test directory");
create_dir_all(&output_dir).expect("Could not create output test directory");
create_test_file(&source_dir.join("image.png"), "A fish playing the banjo");
- let strategy = Strategy {};
let file = File {
path: source_dir.join("image.png"),
file_type: FileType::File,
};
- strategy.handle(&source_dir, &output_dir, &file);
+ Strategy::handle(&source_dir, &output_dir, &file);
let copied_path = &output_dir.join("image.png");
assert!(copied_path.exists());
&source_dir.join("nested/style.css"),
"* { margin: 0; padding: 0 }",
);
- let strategy = Strategy {};
let file = File {
path: source_dir.join("nested/style.css"),
file_type: FileType::File,
};
- strategy.handle(&source_dir, &output_dir, &file);
+ Strategy::handle(&source_dir, &output_dir, &file);
let copied_path = output_dir.join("nested/style.css");
assert!(copied_path.exists());