File: THSpec.hs

package info (click to toggle)
haskell-yaml 0.11.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 272 kB
  • sloc: haskell: 2,371; makefile: 15
file content (17 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
module Data.Yaml.THSpec (spec) where

import           Test.Hspec
import           Data.Aeson

import           Data.Yaml.TH

spec :: Spec
spec = do
  describe "yamlQQ" $ do
    it "parses yaml" $ do
      [yamlQQ|
      name: John Doe
      age: 23
      |] `shouldBe` object ["name" .=  String "John Doe", "age" .= Number 23]