import Data.Ratio ((%)) import Num.ContinuedFraction import Test.Hspec main :: IO () main = hspec $ describe "continuedFraction" $ do parallel $ it "should work on integers" $ continuedFraction (2 :: Double) `shouldBe` [2 :: Integer] parallel $ it "should give an approximation of pi" $ approximate (pi :: Double) (100 :: Integer) `shouldBe` (22 :: Integer) % (7 :: Integer)