File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,9 @@ class TaskSpec: QuickSpec {
5050 }
5151
5252 it ( " should launch a task that writes to stderr " ) {
53+ let aggregated = NSMutableData ( )
5354 let result = launchTask ( Task ( " /usr/bin/stat " , arguments: [ " not-a-real-file " ] ) )
54- . reduce ( NSMutableData ( ) ) { aggregated, event in
55+ . reduce ( aggregated ) { aggregated, event in
5556 if case let . StandardError( data) = event {
5657 aggregated. appendData ( data)
5758 }
@@ -61,9 +62,8 @@ class TaskSpec: QuickSpec {
6162 . single ( )
6263
6364 expect ( result) . notTo ( beNil ( ) )
64- if let data = result? . value {
65- expect ( NSString ( data: data, encoding: NSUTF8StringEncoding) ) . to ( equal ( " stat: not-a-real-file: stat: No such file or directory \n " ) )
66- }
65+ expect ( result? . error) . notTo ( beNil ( ) )
66+ expect ( NSString ( data: aggregated, encoding: NSUTF8StringEncoding) ) . to ( equal ( " stat: not-a-real-file: stat: No such file or directory \n " ) )
6767 }
6868
6969 it ( " should launch a task with standard input " ) {
You can’t perform that action at this time.
0 commit comments