OSDN Git Service

throw stream output instead of using assertEquals()
authorscribu <mail@scribu.net>
Sun, 17 Feb 2013 02:14:02 +0000 (04:14 +0200)
committerscribu <mail@scribu.net>
Sun, 17 Feb 2013 02:18:22 +0000 (04:18 +0200)
features/bootstrap/FeatureContext.php

index daaa5ab..87661bf 100644 (file)
@@ -148,7 +148,11 @@ class FeatureContext extends BehatContext
         */
        public function outputShouldBe( $stream, PyStringNode $output )
        {
-               assertEquals( (string) $output, rtrim( $this->result->$stream, "\n" ) );
+               $result = rtrim( $this->result->$stream, "\n" );
+
+               if ( (string) $output != $result ) {
+                       throw new \Exception( $this->result->$stream );
+               }
        }
 
        /**