Fix issue in external subexpression paths (#3642)

* Fix issue in external subexpression paths

* new clippy dropped

* clippy
This commit is contained in:
JT
2021-06-18 07:59:58 +12:00
committed by GitHub
parent 6c2c16a971
commit d9d956e54f
159 changed files with 285 additions and 324 deletions

View File

@ -98,8 +98,7 @@ impl<'a> Matcher<&'a mut Director> for Play {
}
impl Play {
#[allow(clippy::clippy::wrong_self_convention)]
pub fn to_stdout(mut self, expected: &str) -> Self {
pub fn stdout(mut self, expected: &str) -> Self {
self.stdout_expectation = Some(expected.to_string());
self
}

View File

@ -13,14 +13,14 @@ fn path(p: &Path) -> PathBuf {
#[test]
fn asserts_standard_out_expectation_from_nu_executable() {
Playground::setup("topic", |_, nu| {
assert_that!(nu.cococo("andres"), says().to_stdout("andres"));
assert_that!(nu.cococo("andres"), says().stdout("andres"));
})
}
#[test]
fn asserts_standard_out_expectation_from_nu_executable_pipeline_fed() {
Playground::setup("topic", |_, nu| {
assert_that!(nu.pipeline("echo 'andres'"), says().to_stdout("andres"));
assert_that!(nu.pipeline("echo 'andres'"), says().stdout("andres"));
})
}