hspec-wai 0.6.5 → 0.6.6
raw patch · 2 files changed
+7/−9 lines, 2 filesdep ~with-locationPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: with-location
API changes (from Hackage documentation)
- Test.Hspec.Wai: shouldRespondWith :: (?loc :: CallStack) => WaiSession SResponse -> ResponseMatcher -> WaiExpectation
+ Test.Hspec.Wai: shouldRespondWith :: WithLocation (WaiSession SResponse -> ResponseMatcher -> WaiExpectation)
Files
- hspec-wai.cabal +4/−4
- src/Test/Hspec/Wai.hs +3/−5
hspec-wai.cabal view
@@ -1,9 +1,9 @@--- This file has been generated from package.yaml by hpack version 0.10.0.+-- This file has been generated from package.yaml by hpack version 0.11.0. -- -- see: https://github.com/sol/hpack name: hspec-wai-version: 0.6.5+version: 0.6.6 homepage: https://github.com/hspec/hspec-wai#readme bug-reports: https://github.com/hspec/hspec-wai/issues license: MIT@@ -44,7 +44,7 @@ , hspec-core == 2.* , hspec-expectations , QuickCheck- , with-location+ , with-location >= 0.1.0 exposed-modules: Test.Hspec.Wai Test.Hspec.Wai.QuickCheck@@ -75,7 +75,7 @@ , hspec-core == 2.* , hspec-expectations , QuickCheck- , with-location+ , with-location >= 0.1.0 , hspec , QuickCheck other-modules:
src/Test/Hspec/Wai.hs view
@@ -1,6 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE CPP #-}-#include "with-location.h"+{-# LANGUAGE FlexibleContexts #-} -- | Have a look at the <https://github.com/hspec/hspec-wai#readme README> for -- an example of how to use this library. module Test.Hspec.Wai (@@ -33,8 +32,6 @@ , pendingWith ) where -with_location_imports- import Data.Foldable import Data.ByteString (ByteString) import qualified Data.ByteString.Lazy as LB@@ -43,6 +40,7 @@ import Network.HTTP.Types import Network.Wai.Test hiding (request) import qualified Network.Wai.Test as Wai+import Data.WithLocation import Test.Hspec.Core.Spec hiding (pending, pendingWith) import qualified Test.Hspec.Core.Spec as Core@@ -99,7 +97,7 @@ -- -- > get "/" `shouldRespondWith` "foo" {matchHeaders = ["Content-Type" <:> "text/plain"]} -- > -- matches if body is "foo", status is 200 and ther is a header field "Content-Type: text/plain"-shouldRespondWith :: with_location WaiSession SResponse -> ResponseMatcher -> WaiExpectation+shouldRespondWith :: WithLocation (WaiSession SResponse -> ResponseMatcher -> WaiExpectation) shouldRespondWith action matcher = do r <- action forM_ (match r matcher) (liftIO . expectationFailure)