From 50987c14217f9d628294ef229f7215701cb03fc7 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 31 Aug 2019 20:20:43 +0300 Subject: Change: Fable acceptance tests: formatting, produce docs too --- fable-arch.md | 20 ++++++++++++++++---- fable-arch.yaml | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/fable-arch.md b/fable-arch.md index 2f29edf..4070b52 100644 --- a/fable-arch.md +++ b/fable-arch.md @@ -428,12 +428,20 @@ other resource constraints. ## The simplest possible scenario -This tests that Fable can run a simplest possible scenario -successfully. The test is based on generating the test program from an -input file, running the test program, and examining the log file. +This tests that Fable can build a PDF and an HTML document, and +execute a simple scenario successfully. The test is based on +generating the test program from an input file, running the test +program, and examining the log file. ```fable given files simple.md, simple.yaml, and simple.py + +when I run ftt-docgen --pdf simple.md +then file simple.pdf exists + +when I run ftt-docgen --html simple.md +then file simple.html exists + when I run ftt-codegen --run simple.md then log file says scenario "Simple" was run and log file says step "given precondition foo" was run @@ -486,15 +494,18 @@ Markdown file successfully. ```fable given files two.md, two.yaml, and two.py when I run ftt-codegen --run two.md + then log file says scenario "First" was run and log file says step "given precondition foo" was run and log file says step "when I do bar" was run and log file says step "then bar was done" was run + then log file says scenario "Second" was run and log file says step "given precondition foo" was run and log file says step "when I do bar" was run and log file says step "then bar was done" was run -and program finished successfully + +and test program finished successfully ``` ### two.md—markdown file @@ -549,6 +560,7 @@ This tests that Fable can run handle a scenario step failing. ```fable given files fail.md, fail.yaml, and fail.py when I run ftt-codegen --run fail.md + then log file says scenario "Fail" was run and log file says step "given precondition foo" was run and log file says step "then bar was done" failed diff --git a/fable-arch.yaml b/fable-arch.yaml index 5dc8278..0777104 100644 --- a/fable-arch.yaml +++ b/fable-arch.yaml @@ -1,5 +1,8 @@ - given: files (?P\S+), (?P\S+), and (?P\S+) +- when: I run ftt-docgen --html (?P\S+) +- when: I run ftt-docgen --pdf (?P\S+) - when: I run ftt-codegen --run (?P\S+) +- then: file (?P\S+) exists - then: log file says scenario "(?P.+)" was run - then: log file says step "(?Pgiven|when|then) (?P.+)" was run - then: program finished successfully -- cgit v1.2.1