Home

Awesome

If the truth shall kill them, let them die.

This library allows you to make quickcheck Generators out of Fake functions from fakedata.

import qualified Faker.Company as CM

isDomain :: Text -> Bool
isDomain = (=~ "^[A-Za-z_]+\\.[a-z]{1,4}$") . T.unpack

spec :: Spec
spec = do
  describe "fakedata quickcheck" $
  it "forall domain fullfils is a domain name regex" $
    Q.property $ Q.forAll (fakeQuickcheck CM.domain) isDomain

See the full code in the tests.