[180] r361@phpspec (orig r180): padraic.brady | 2008-01-09 09:41:51 -0700

0 views
Skip to first unread message

nor...@domain51.com

unread,
Jan 9, 2008, 11:42:30 AM1/9/08
to phpspec...@googlegroups.com
Revision
180
Author
phpspec
Date
2008-01-09 09:42:30 -0700 (Wed, 09 Jan 2008)

Log Message

 r361@phpspec (orig r180):  padraic.brady | 2008-01-09 09:41:51 -0700
 Hectic output fixes!

Modified Paths

Property Changed

Diff

Property changes:


Name: svk:merge
   - d6e91ea2-e33a-0410-98df-1d493bd67c58:/:179
   + d6e91ea2-e33a-0410-98df-1d493bd67c58:/:180

Modified: trunk/build/build.xml (179 => 180)


--- trunk/build/build.xml	2008-01-09 14:36:15 UTC (rev 179)
+++ trunk/build/build.xml	2008-01-09 16:42:30 UTC (rev 180)
@@ -44,7 +44,7 @@
     <property name="spec.src.default" value="${project.basedir}/.." />
     <property name="spec.src.classpath" value="/src" />
     <property name="spec.name" value="PHPSpec" />
-    <property name="spec.version" value="0.2.0" /> <!-- VERSION FOR EDITING -->
+    <property name="spec.version" value="0.2.1" /> <!-- VERSION FOR EDITING -->
     <property name="spec.stability" value="stable" />
     <property name="spec.svn.baseurl" value="http://phpspec.googlecode.com/svn/" />
     <property name="spec.svn.url" value="${svn.url}/trunk" />
@@ -216,6 +216,11 @@
                 <install as="phpspec.bat" name="scripts/phpspec.bat" />
             </release>
 
+			<changelog version="0.2.1" date="2008-01-09" license="LGPL">
+                * Fixes a minor output bug missed in QA for HTML and TEXT
+				  reporters
+            </changelog>
+
 			<changelog version="0.2.0" date="2008-01-09" license="LGPL">
                 * Added support for HTML reporting output
 				* Added support for executing specs from a HTTP Runner

Modified: trunk/src/PHPSpec/Context.php (179 => 180)


--- trunk/src/PHPSpec/Context.php	2008-01-09 14:36:15 UTC (rev 179)
+++ trunk/src/PHPSpec/Context.php	2008-01-09 16:42:30 UTC (rev 180)
@@ -171,6 +171,10 @@
 
     public function fail($message = null)
     {
+        if (is_null($message)) {
+        	$message = 'Deliberate Fail';
+        }
+
         throw new PHPSpec_Runner_DeliberateFailException($message);
     }
 

Modified: trunk/src/PHPSpec/Runner/Reporter/Html.php (179 => 180)


--- trunk/src/PHPSpec/Runner/Reporter/Html.php	2008-01-09 14:36:15 UTC (rev 179)
+++ trunk/src/PHPSpec/Runner/Reporter/Html.php	2008-01-09 16:42:30 UTC (rev 180)
@@ -208,7 +208,7 @@
 
 
 	private function renderFailures(){
-		if ($this->_result->countFailures() > 0) {
+		if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
 		?>
 		<div id="failures">
 			<h2>Failures</h2>
@@ -222,7 +222,18 @@
 					<code class="message"><?php echo $failure->getFailedMessage(); ?></code>					
 				</div>
 				<?php				
-			}?>			
+			}?>
+            <?php			
+			$failed = $this->_result->getTypes('deliberateFail');
+			foreach ($failed as $failure) {
+				?>
+				<div class="failure">
+					<span class="context"><?php echo $this->_format($failure->getContextDescription()); ?></span>
+					<span class="spec"><?php echo $failure->getSpecificationText(); ?> FAILED</span>
+					<code class="message"><?php echo $failure->getMessage(); ?></code>					
+				</div>
+				<?php				
+			}?>
 		</div>
 		<?php
 		}
@@ -239,7 +250,7 @@
 				?>
 				<div class="error">
 					<span class="context"><?php echo $this->_format($error->getContextDescription()); ?></span>
-					<span class="spec"><?php echo $error->getSpecificationText(); ?> FAILED</span>
+					<span class="spec"><?php echo $error->getSpecificationText(); ?> ERROR</span>
 					<code class="message"><?php echo $error->toString(); ?></code>					
 				</div>
 				<?php				
@@ -260,7 +271,7 @@
 				?>
 				<div class="exception">
 					<span class="context"><?php echo $this->_format($exception->getContextDescription()); ?></span>
-					<span class="spec"><?php echo $exception->getSpecificationText(); ?> FAILED</span>
+					<span class="spec"><?php echo $exception->getSpecificationText(); ?> EXCEPTION</span>
 					<code class="message"><?php echo $exception->toString(); ?></code>					
 				</div>
 				<?php				
@@ -281,7 +292,7 @@
 				?>
 				<div class="exception">
 					<span class="context"><?php echo $this->_format($pending->getContextDescription()); ?></span>
-					<span class="spec"><?php echo $pending->getSpecificationText(); ?> FAILED</span>
+					<span class="spec"><?php echo $pending->getSpecificationText(); ?> PENDING</span>
 					<code class="message"><?php echo $pending->getMessage(); ?></code>					
 				</div>
 				<?php				

Modified: trunk/src/PHPSpec/Runner/Reporter/Text.php (179 => 180)


--- trunk/src/PHPSpec/Runner/Reporter/Text.php	2008-01-09 14:36:15 UTC (rev 179)
+++ trunk/src/PHPSpec/Runner/Reporter/Text.php	2008-01-09 16:42:30 UTC (rev 180)
@@ -82,7 +82,7 @@
         }
         
         $reportedIssues = PHP_EOL . PHP_EOL;
-        if ($this->_result->countFailures() > 0) {
+        if ($this->_result->countFailures() > 0 || $this->_result->countDeliberateFailures() > 0) {
             $reportedIssues .= 'Failures:' . PHP_EOL . PHP_EOL;
             $failed = $this->_result->getTypes('fail');
             $increment = 1;
Reply all
Reply to author
Forward
0 new messages