+ use super::*;
+
+ use test_utilities::*;
+
+ #[test]
+ fn identifies_layout_file() {
+ let test_dir = setup_test_dir();
+ create_test_file(&test_dir.join("_layout.html"), "");
+ let strategy = Strategy {};
+ assert!(strategy.is(&test_dir.join("_layout.html")));
+ }
+
+ #[test]
+ fn rejects_non_layout_html() {
+ let test_dir = setup_test_dir();
+ create_test_file(&test_dir.join("regular.html"), "");
+ let strategy = Strategy {};
+ assert!(!strategy.is(&test_dir.join("regular.html")));
+ }
+
+ #[test]
+ fn rejects_layout_with_different_extension() {
+ let test_dir = setup_test_dir();
+ create_test_file(&test_dir.join("_layout.txt"), "");
+ let strategy = Strategy {};
+ assert!(!strategy.is(&test_dir.join("_layout.txt")));
+ }
+
+ #[test]
+ fn rejects_layout_with_prefix() {
+ let test_dir = setup_test_dir();
+ create_test_file(&test_dir.join("prefix_layout.txt"), "");
+ let strategy = Strategy {};
+ assert!(!strategy.is(&test_dir.join("prefix_layout.txt")));