Skip to content

Release v4.2.0

Choose a tag to compare

@github-actions github-actions released this 27 Nov 13:58
686ce60

Scenarios can start from reusable given contexts, like the given classes of the C# specs.

Added

  • Cratis.Chronicle.Testing.Given: a module that holds the facts several specs start from, named for the situation (an_open_account), kept in a given/ folder beside the specs.
  • given: [Context] on EventScenario, ReadModelScenario and ReactorScenario applies contexts before the spec's own setup_all; given/2 applies a context (a module, {module, argument} or a function) in a pipeline, and contexts compose.
  • setup: {module, function} prepares what a spec needs around the kernel (a fake started with start_supervised!/1) before the contexts run.
  • mix test ignores the given/ scripts through test_ignore_filters.