[202] r405@phpspec (orig r202): padraic.brady | 2008-01-16 09:41:52 -0700

0 views
Skip to first unread message

nor...@domain51.com

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

Log Message

 r405@phpspec (orig r202):  padraic.brady | 2008-01-16 09:41:52 -0700
 * Added spec for non-200 negative matching to beSuccess

Modified Paths

Property Changed

Diff

Property changes:


Name: svk:merge
   - d6e91ea2-e33a-0410-98df-1d493bd67c58:/:201
   + d6e91ea2-e33a-0410-98df-1d493bd67c58:/:202

Modified: branches/zend/specs/ContextZendSpec.php (201 => 202)


--- branches/zend/specs/ContextZendSpec.php	2008-01-16 16:38:47 UTC (rev 201)
+++ branches/zend/specs/ContextZendSpec.php	2008-01-16 16:42:46 UTC (rev 202)
@@ -149,6 +149,15 @@
         $response->should->beSuccess();
     }
 
+    public function itShouldAttachBesuccessMatcherToResponseAndFailIfNo200ResponseCode() 
+    {
+        $context = new DescribeFooController;
+        $response = new PHPSpec_Context_Zend_Response;
+        $response->setContext($context);
+        $response->setHttpResponseCode(300);
+        $response->shouldNot->beSuccess();
+    }
+
     public function after()
     {
         PHPSpec_Context_Zend::clearModuleDirectories();
Reply all
Reply to author
Forward
0 new messages