@@ -481,4 +481,15 @@ mod tests {
481481 "Bourne Again Shell (bash)"
482482 );
483483 }
484+
485+ #[test]
486+ fn issue_1008() {
487+ let test = SyntaxDetectionTest::new();
488+
489+ assert_eq!(
490+ test.syntax_for_file_with_content("bin/rails", "#!/usr/bin/env ruby"),
491+ "Ruby"
492+ );
493+ assert_eq!(test.syntax_for_file("example.rails"), "HTML (Rails)");
494+ }
484495}