1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! BDD-style scenario helper for narrative test logs.
//!
//! Tests across the workspace use a small Given/When/Then helper to make
//! scenario-style integration and unit tests self-documenting. Each call
//! prints a labeled line to stderr so failing test output reads like a
//! scenario transcript.
/// Narrative scenario logger that prints `Scenario` / `Given` / `When` / `Then`
/// lines to stderr, prefixed with the scenario name.
///
/// # Example
///
/// ```
/// use perl_tdd_support::BddScenario;
///
/// let scenario = BddScenario::new("addition is commutative");
/// scenario.given("two numbers");
/// scenario.when("they are added in either order");
/// scenario.then("the sums are equal");
/// ```