packages feed

hspec-wai 0.2.0 → 0.3.0

raw patch · 3 files changed

+16/−6 lines, 3 filesdep ~aeson-qqPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson-qq

API changes (from Hackage documentation)

+ Test.Hspec.Wai: delete :: ByteString -> WaiSession SResponse
+ Test.Hspec.Wai: patch :: ByteString -> ByteString -> WaiSession SResponse

Files

README.lhs view
@@ -34,20 +34,20 @@ spec :: Spec spec = with app $ do   describe "GET /" $ do-    it "reponds with 200" $ do+    it "responds with 200" $ do       get "/" `shouldRespondWith` 200 -    it "reponds with 'hello'" $ do+    it "responds with 'hello'" $ do       get "/" `shouldRespondWith` "hello" -    it "reponds with 200 / 'hello'" $ do+    it "responds with 200 / 'hello'" $ do       get "/" `shouldRespondWith` "hello" {matchStatus = 200}      it "has Content-Type: text/plain" $ do       get "/" `shouldRespondWith` 200 {matchHeaders = [(hContentType, "text/plain")]}    describe "GET /some-json" $ do-    it "reponds with some JSON" $ do+    it "responds with some JSON" $ do       get "/some-json" `shouldRespondWith` [json|{foo: 23, bar: 42}|] ~~~ 
hspec-wai.cabal view
@@ -1,5 +1,5 @@ name:             hspec-wai-version:          0.2.0+version:          0.3.0 license:          MIT license-file:     LICENSE copyright:        (c) 2012-2014 Fujimura Daisuke,@@ -40,7 +40,7 @@     , hspec2     , template-haskell     , aeson-    , aeson-qq >= 0.7.1+    , aeson-qq >= 0.7.2  test-suite spec   type:
src/Test/Hspec/Wai.hs view
@@ -10,6 +10,8 @@ , get , post , put+, patch+, delete , request  -- * Matching on the response@@ -88,6 +90,14 @@ -- | Perform a @PUT@ request to the application under test. put :: ByteString -> LB.ByteString -> WaiSession SResponse put = request methodPut++-- | Perform a @PATCH@ request to the application under test.+patch :: ByteString -> LB.ByteString -> WaiSession SResponse+patch = request methodPatch++-- | Perform a @DELETE@ request to the application under test.+delete :: ByteString -> WaiSession SResponse+delete path = request methodDelete path ""  -- | Perform a request to the application under test, with specified HTTP -- method, request path and body.