Merge pull request #1583 from haskell-servant/hspec-no-color
Disable hspec colored output in servant-swagger doctests
This commit is contained in:
commit
117a2cc5e1
2 changed files with 4 additions and 0 deletions
|
@ -55,6 +55,7 @@ import Servant.Swagger.Internal.Orphans ()
|
||||||
-- >>> import Data.Typeable
|
-- >>> import Data.Typeable
|
||||||
-- >>> import GHC.Generics
|
-- >>> import GHC.Generics
|
||||||
-- >>> import Servant.API
|
-- >>> import Servant.API
|
||||||
|
-- >>> import System.Environment
|
||||||
-- >>> import Test.Hspec
|
-- >>> import Test.Hspec
|
||||||
-- >>> import Test.QuickCheck
|
-- >>> import Test.QuickCheck
|
||||||
-- >>> import qualified Data.ByteString.Lazy.Char8 as BSL8
|
-- >>> import qualified Data.ByteString.Lazy.Char8 as BSL8
|
||||||
|
@ -64,6 +65,7 @@ import Servant.Swagger.Internal.Orphans ()
|
||||||
-- >>> :set -XGeneralizedNewtypeDeriving
|
-- >>> :set -XGeneralizedNewtypeDeriving
|
||||||
-- >>> :set -XOverloadedStrings
|
-- >>> :set -XOverloadedStrings
|
||||||
-- >>> :set -XTypeOperators
|
-- >>> :set -XTypeOperators
|
||||||
|
-- >>> setEnv "HSPEC_COLOR" "no"
|
||||||
-- >>> data User = User { name :: String, age :: Int } deriving (Show, Generic, Typeable)
|
-- >>> data User = User { name :: String, age :: Int } deriving (Show, Generic, Typeable)
|
||||||
-- >>> newtype UserId = UserId Integer deriving (Show, Generic, Typeable, ToJSON)
|
-- >>> newtype UserId = UserId Integer deriving (Show, Generic, Typeable, ToJSON)
|
||||||
-- >>> instance ToJSON User
|
-- >>> instance ToJSON User
|
||||||
|
|
|
@ -29,10 +29,12 @@ import Servant.Swagger.Internal.TypeLevel
|
||||||
-- >>> import Control.Applicative
|
-- >>> import Control.Applicative
|
||||||
-- >>> import GHC.Generics
|
-- >>> import GHC.Generics
|
||||||
-- >>> import Test.QuickCheck
|
-- >>> import Test.QuickCheck
|
||||||
|
-- >>> import System.Environment (setEnv)
|
||||||
-- >>> :set -XDeriveGeneric
|
-- >>> :set -XDeriveGeneric
|
||||||
-- >>> :set -XGeneralizedNewtypeDeriving
|
-- >>> :set -XGeneralizedNewtypeDeriving
|
||||||
-- >>> :set -XDataKinds
|
-- >>> :set -XDataKinds
|
||||||
-- >>> :set -XTypeOperators
|
-- >>> :set -XTypeOperators
|
||||||
|
-- >>> setEnv "HSPEC_COLOR" "no"
|
||||||
|
|
||||||
-- | Verify that every type used with @'JSON'@ content type in a servant API
|
-- | Verify that every type used with @'JSON'@ content type in a servant API
|
||||||
-- has compatible @'ToJSON'@ and @'ToSchema'@ instances using @'validateToJSON'@.
|
-- has compatible @'ToJSON'@ and @'ToSchema'@ instances using @'validateToJSON'@.
|
||||||
|
|
Loading…
Reference in a new issue