use microtemplate::{Substitutions, render};
#[derive(Substitutions)]
struct Movie<'a> {
name: &'a str, description: &'a str,
}
#[test]
fn readme_example() {
let the_birds = Movie {
name: "The Birds",
description: "a swarm of birds that suddenly and violently attack the residents of a California coastal town",
};
let rendered = render("{name} is a movie about {description}.", the_birds);
assert_eq!(rendered, "The Birds is a movie about a swarm of birds that suddenly and violently attack the residents of a California coastal town.");
}