OSDN Git Service

make 'should run without errors' failure more descriptive
authorscribu <mail@scribu.net>
Sun, 17 Feb 2013 01:49:53 +0000 (03:49 +0200)
committerscribu <mail@scribu.net>
Sun, 17 Feb 2013 02:18:22 +0000 (04:18 +0200)
features/bootstrap/FeatureContext.php

index 93f9593..daaa5ab 100644 (file)
@@ -136,8 +136,11 @@ class FeatureContext extends BehatContext
         */
        public function itShouldRunWithoutErrors()
        {
-               assertEquals( 0, $this->result->return_code );
-               assertEmpty( $this->result->STDERR );
+               if ( !empty( $this->result->STDERR ) )
+                       throw new \Exception( $this->result->STDERR );
+
+               if ( 0 != $this->result->return_code )
+                       throw new \Exception( "Return code was $this->result->return_code" );
        }
 
        /**