Skip to content

Conversation

ruhatch
Copy link
Contributor

@ruhatch ruhatch commented Oct 26, 2018

We are using this change to have specific sets of properties, for example golden tests, with their own prefix.

Copy link
Member

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to have different tests in separate groups instead? Because Group might be all you need, since it's a named collection of property tests:

-- | A named collection of property tests.
--
data Group =
  Group {
      groupName :: !GroupName
    , groupProperties :: ![(PropertyName, Property)]
    }

Or, with TH, you can semantically group different tests in separate modules, and just do something like

results <- sequence [
    Test.Module.A.tests
  , Test.Module.B.tests
  , Test.Module.C.tests
  ]

unless (and results) $
  exitFailure

Hypothetically, A is your golden tests, B is your foo tests, and C is your bar tests, and so on.

@jacobstanley
Copy link
Member

This is a nice change, thanks for the PR.

@jacobstanley jacobstanley merged commit 6a4c483 into hedgehogqa:master Mar 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants