packages feed

hspec-wai 0.3.0.2 → 0.4.0

raw patch · 3 files changed

+12/−14 lines, 3 filesdep −hspec-metaPVP ok

version bump matches the API change (PVP)

Dependencies removed: hspec-meta

API changes (from Hackage documentation)

- Test.Hspec.Wai: request :: Method -> ByteString -> ByteString -> WaiSession SResponse
+ Test.Hspec.Wai: request :: Method -> ByteString -> [Header] -> ByteString -> WaiSession SResponse

Files

hspec-wai.cabal view
@@ -1,5 +1,5 @@ name:             hspec-wai-version:          0.3.0.2+version:          0.4.0 license:          MIT license-file:     LICENSE copyright:        (c) 2012-2014 Fujimura Daisuke,@@ -61,8 +61,6 @@     , wai     , wai-extra     , hspec2--    , hspec-meta  test-suite README   type:
src/Test/Hspec/Wai.hs view
@@ -81,27 +81,27 @@  -- | Perform a @GET@ request to the application under test. get :: ByteString -> WaiSession SResponse-get path = request methodGet path ""+get path = request methodGet path [] ""  -- | Perform a @POST@ request to the application under test. post :: ByteString -> LB.ByteString -> WaiSession SResponse-post = request methodPost+post path = request methodPost path []  -- | Perform a @PUT@ request to the application under test. put :: ByteString -> LB.ByteString -> WaiSession SResponse-put = request methodPut+put path = request methodPut path []  -- | Perform a @PATCH@ request to the application under test. patch :: ByteString -> LB.ByteString -> WaiSession SResponse-patch = request methodPatch+patch path = request methodPatch path []  -- | Perform a @DELETE@ request to the application under test. delete :: ByteString -> WaiSession SResponse-delete path = request methodDelete path ""+delete path = request methodDelete path [] ""  -- | Perform a request to the application under test, with specified HTTP--- method, request path and body.-request :: Method -> ByteString -> LB.ByteString -> WaiSession SResponse-request method path body = getApp >>= liftIO . runSession (Wai.srequest $ SRequest req body)-  where-    req = setPath defaultRequest {requestMethod = method} path+-- method, request path, headers and body.+request :: Method -> ByteString -> [Header] -> LB.ByteString -> WaiSession SResponse+request method path headers body = getApp >>= liftIO . runSession (Wai.srequest $ SRequest req body)+ where+   req = setPath defaultRequest {requestMethod = method, requestHeaders = headers} path
test/Spec.hs view
@@ -1,1 +1,1 @@-{-# OPTIONS_GHC -F -pgmF hspec-meta-discover #-}+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}