From b2ca6ef94c275038efbdf75c15cb48c9383b65d9 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 3 Jan 2018 13:56:56 +0100 Subject: core: Do not create files in tests. - Do not create files in $HOME/.sequoia in the doc tests by using ephemeral home directories and not running the example with the simple constructor. --- core/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/src/lib.rs b/core/src/lib.rs index bfd3cf9d..aa9f0232 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -15,7 +15,7 @@ use tempdir::TempDir; /// A context with reasonable defaults can be created using /// `Context::new`: /// -/// ``` +/// ```no_run /// # use sequoia_core::{Context, Result}; /// # f().unwrap(); /// # fn f() -> Result<()> { @@ -32,6 +32,7 @@ use tempdir::TempDir; /// # f().unwrap(); /// # fn f() -> Result<()> { /// let c = Context::configure("org.example.webmail") +/// # .ephemeral() /// .network_policy(NetworkPolicy::Offline) /// .build()?; /// # Ok(()) @@ -119,6 +120,7 @@ impl Context { /// # f().unwrap(); /// # fn f() -> Result<()> { /// let c = Context::configure("org.example.webmail") +/// # .ephemeral() /// .network_policy(NetworkPolicy::Offline) /// .build()?; /// # Ok(()) -- cgit v1.2.3