Expand description
Expectation’s core model: the vocabulary a suite is written in, the conditions built from it, and the expectations and stories that use them.
An expectation says how the system behaves: given some state, when something happens, then the system ends up in some state. A story is a user’s journey through those behaviours, which becomes an acceptance test. Everything here is plain data plus the condition algebra (intersection, implication, overlay) that conflict detection, the flow graph and story planning are built on.
Re-exports§
pub use condition::Condition;pub use condition::Constraint;pub use condition::Interval;pub use diagnostic::Diagnostic;pub use diagnostic::Label;pub use diagnostic::Severity;pub use diagnostic::Sources;pub use diagnostic::Span;pub use spec::ExpId;pub use spec::Expectation;pub use spec::Fact;pub use spec::Feature;pub use spec::FeatureId;pub use spec::Keyword;pub use spec::Phrase;pub use spec::PhraseBody;pub use spec::PhraseId;pub use spec::Said;pub use spec::Scenario;pub use spec::Section;pub use spec::SectionId;pub use spec::Shift;pub use spec::StepText;pub use spec::Story;pub use spec::StoryId;pub use spec::StoryStep;pub use spec::Suite;pub use spec::Term;pub use spec::Trigger;pub use vocabulary::Event;pub use vocabulary::EventId;pub use vocabulary::Value;pub use vocabulary::VarId;pub use vocabulary::VarKind;pub use vocabulary::Variable;pub use vocabulary::Vocabulary;
Modules§
- condition
- The condition algebra. A
Conditionis a conjunction of per-variableConstraints and stands for the set of states that satisfy it. Conflict detection, the flow graph and story planning reduce to three questions about such sets: do two overlap, does one imply the other, and what is left after an action overwrites some variables. - diagnostic
- Errors and warnings about a suite, pointing at the lines they’re about.
- spec
- Expectations, features and stories: what a suite says, after its text has been resolved against the vocabulary.
- text
- Text helpers shared by the parser, diagnostics and docs: matching keys, slugs, numbers.
- vocabulary
- The suite’s ubiquitous language: the states the system can be in and the events that happen to it. A step only means something if it is written in these terms, which is what lets two expectations be compared mechanically.