adhoc-fixtures-hspec-0.1.0.1: Manage fine grained fixtures
CopyrightGautier DI FOLCO
LicenseISC
MaintainerGautier DI FOLCO <gautier.difolco@gmail.com>
StabilityUnstable
Portabilitynot portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Fixtures.Adhoc.Hspec

Description

Fixtures builder and runner

Example:

aroundAllWith (withFixtureAppendLift @"tracker" @_ @"box" boxFixture) $ do
  it "Tracker should have one key (added)" $ \fixture ->
    readIORef fixture.tracker `shouldReturn` [("box00", 42)]
Synopsis

Documentation

withFixtureAppendLift :: forall (name :: Symbol) a (builderName :: Symbol) b. HasNotField builderName '[Field name a] => BuilderWith '[Field name a] IO builderName b -> ActionWith (Record '[Field builderName b, Field name a]) -> ActionWith a Source #

Fixture builder (should be used directly with care)

withFixtureAppend :: forall (builderName :: Symbol) b items. HasNotField builderName items => BuilderWith items IO builderName b -> ActionWith (Record (Field builderName b ': items)) -> ActionWith (Record items) Source #