diff --git a/contrib/src/templates/mod.rs b/contrib/src/templates/mod.rs index 50ac9893..c7169a75 100644 --- a/contrib/src/templates/mod.rs +++ b/contrib/src/templates/mod.rs @@ -133,14 +133,16 @@ impl Template { /// /// # Example /// - /// ```rust,ignore + /// ```rust /// use std::collections::HashMap; /// use rocket_contrib::Template; /// /// // Create a `context`. Here, just an empty `HashMap`. /// let mut context = HashMap::new(); + /// + /// # context.insert("test", "test"); /// let template = Template::render("index", &context); - /// ``` + /// # assert_eq!(template.to_string(), ""); pub fn render(name: S, context: &T) -> Template where S: AsRef, T: Serialize {