r405@phpspec (orig r202): padraic.brady | 2008-01-16 09:41:52 -0700 * Added spec for non-200 negative matching to beSuccess
Name: svk:merge
- d6e91ea2-e33a-0410-98df-1d493bd67c58:/:201
+ d6e91ea2-e33a-0410-98df-1d493bd67c58:/: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();