From 2fc1a2fc9c97a898ae6419c0512d2f2f824f8b7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 2 Sep 2018 13:27:04 +0100 Subject: [PATCH] add contents in the acceptance test --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index e953d27..00a86e2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -37,13 +37,15 @@ mod rustback { use tempfile::tempfile_in; use tempfile::TempDir; use dir_diff::is_different; + use std::fs::write; #[test] fn be_able_to_restore_backed_up_files() -> Result<(), Error> { let source = tempdir()?; - File::create(source.path().join("first"))?; - File::create(source.path().join("second"))?; - File::create(source.path().join("third"))?; + + File::create(source.path().join("first"))?.write_all("some contents".as_bytes())?; + File::create(source.path().join("second"))?.write_all("some contents".as_bytes())?; + File::create(source.path().join("third"))?.write_all("some other contents".as_bytes())?; let backup_engine = BackupEngine::new(&source.path()); backup_engine.backup();