mirror of https://github.com/rwf2/Rocket.git
Fix conditional compilation for contrib templates tests.
This commit is contained in:
parent
1e8e4cc553
commit
397a646dcf
|
@ -1,6 +1,8 @@
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
extern crate rocket_contrib;
|
extern crate rocket_contrib;
|
||||||
|
|
||||||
|
#[cfg(feature = "templates")]
|
||||||
|
mod templates_tests {
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
@ -18,7 +20,7 @@ fn rocket() -> Rocket {
|
||||||
.extra("template_dir", template_root().to_str().expect("template directory"))
|
.extra("template_dir", template_root().to_str().expect("template directory"))
|
||||||
.expect("valid configuration");
|
.expect("valid configuration");
|
||||||
|
|
||||||
rocket::custom(config, true).attach(Template::fairing())
|
::rocket::custom(config, true).attach(Template::fairing())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "tera_templates")]
|
#[cfg(feature = "tera_templates")]
|
||||||
|
@ -68,4 +70,4 @@ mod handlebars_tests {
|
||||||
assert_eq!(template, Some(EXPECTED.into()));
|
assert_eq!(template, Some(EXPECTED.into()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue