let strategy = Strategy {};
assert!(strategy.is(&test_dir.join("image.png")));
assert!(strategy.is(&test_dir.join("style.css")));
+ }
+
+ #[test]
+ fn rejects_directories() {
+ let test_dir = setup_test_dir();
+ let strategy = Strategy {};
assert!(!strategy.is(&test_dir));
}
}
#[test]
- fn handles_correct_file_type() {
+ fn handles_file_type() {
let strategy = Strategy {};
assert!(strategy.can_handle(&FileType::File));
+ }
+
+ #[test]
+ fn rejects_non_file_types() {
+ let strategy = Strategy {};
assert!(!strategy.can_handle(&FileType::Layout));
assert!(!strategy.can_handle(&FileType::Gemini));
assert!(!strategy.can_handle(&FileType::Unknown));