From b114125dfbb4c97580ae076c07c6816ccdca51b8 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Mon, 24 Aug 2020 18:04:20 -0700 Subject: Introduce builder infrastructure for assembling Nitrocli instance In the future we would like to provide more ways for tests to create a Nitrocli instance. In order to prevent explosion of with_XXX methods for each possible combination of arguments, this change introduces a Builder struct that can be used to create such an instance in an idiomatic way. --- src/tests/status.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tests/status.rs') diff --git a/src/tests/status.rs b/src/tests/status.rs index c9f4976..ea573e3 100644 --- a/src/tests/status.rs +++ b/src/tests/status.rs @@ -49,7 +49,7 @@ $"#, ) .unwrap(); - let out = Nitrocli::with_model(model).handle(&["status"])?; + let out = Nitrocli::make().model(model).build().handle(&["status"])?; assert!(re.is_match(&out), out); Ok(()) } @@ -75,7 +75,7 @@ $"#, ) .unwrap(); - let out = Nitrocli::with_model(model).handle(&["status"])?; + let out = Nitrocli::make().model(model).build().handle(&["status"])?; assert!(re.is_match(&out), out); Ok(()) } -- cgit v1.2.1