Skip to content

About

Fake a -> Gen a

Resources

Stars

0 stars

Watchers

2 watching

Forks

Repository files navigation

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.

About

Fake a -> Gen a

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages