1- use environment:: Environment ;
2- use error_chain:: ChainedError ;
3- use errors:: * ;
4- use output:: { Output , OutputKind , OutputPredicate } ;
51use std:: default;
62use std:: ffi:: { OsStr , OsString } ;
73use std:: io:: Write ;
84use std:: path:: PathBuf ;
95use std:: process:: { Command , Stdio } ;
106use std:: vec:: Vec ;
117
8+ use environment:: Environment ;
9+ use error_chain:: ChainedError ;
10+
11+ use errors:: * ;
12+ use output:: { Content , Output , OutputKind , OutputPredicate } ;
13+
1214/// Assertions for a specific command.
1315#[ derive( Debug ) ]
1416#[ must_use]
@@ -375,7 +377,7 @@ impl Assert {
375377
376378 self . expect_output
377379 . iter ( )
378- . map ( |a| a. verify_output ( & output) . chain_err ( || ErrorKind :: AssertionFailed ( self . cmd . clone ( ) ) ) )
380+ . map ( |a| a. verify ( & output) . chain_err ( || ErrorKind :: AssertionFailed ( self . cmd . clone ( ) ) ) )
379381 . collect :: < Result < Vec < ( ) > > > ( ) ?;
380382
381383 Ok ( ( ) )
@@ -419,7 +421,7 @@ impl OutputAssertionBuilder {
419421 /// .stdout().contains("42")
420422 /// .unwrap();
421423 /// ```
422- pub fn contains < O : Into < String > > ( mut self , output : O ) -> Assert {
424+ pub fn contains < O : Into < Content > > ( mut self , output : O ) -> Assert {
423425 let pred = OutputPredicate :: new ( self . kind , Output :: contains ( output) ) ;
424426 self . assertion . expect_output . push ( pred) ;
425427 self . assertion
@@ -436,7 +438,7 @@ impl OutputAssertionBuilder {
436438 /// .stdout().is("42")
437439 /// .unwrap();
438440 /// ```
439- pub fn is < O : Into < String > > ( mut self , output : O ) -> Assert {
441+ pub fn is < O : Into < Content > > ( mut self , output : O ) -> Assert {
440442 let pred = OutputPredicate :: new ( self . kind , Output :: is ( output) ) ;
441443 self . assertion . expect_output . push ( pred) ;
442444 self . assertion
@@ -453,7 +455,7 @@ impl OutputAssertionBuilder {
453455 /// .stdout().doesnt_contain("73")
454456 /// .unwrap();
455457 /// ```
456- pub fn doesnt_contain < O : Into < String > > ( mut self , output : O ) -> Assert {
458+ pub fn doesnt_contain < O : Into < Content > > ( mut self , output : O ) -> Assert {
457459 let pred = OutputPredicate :: new ( self . kind , Output :: doesnt_contain ( output) ) ;
458460 self . assertion . expect_output . push ( pred) ;
459461 self . assertion
@@ -470,7 +472,7 @@ impl OutputAssertionBuilder {
470472 /// .stdout().isnt("73")
471473 /// .unwrap();
472474 /// ```
473- pub fn isnt < O : Into < String > > ( mut self , output : O ) -> Assert {
475+ pub fn isnt < O : Into < Content > > ( mut self , output : O ) -> Assert {
474476 let pred = OutputPredicate :: new ( self . kind , Output :: isnt ( output) ) ;
475477 self . assertion . expect_output . push ( pred) ;
476478 self . assertion
0 commit comments