branch: elpa/buttercup
commit 427a798ceab7e5251350b66ab5b9958a4d40021f
Author: Ola Nilsson <[email protected]>
Commit: Ola Nilsson <[email protected]>

    docs: Add more examples of :to-throw to writing-tests.md
---
 docs/writing-tests.md | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/docs/writing-tests.md b/docs/writing-tests.md
index 758d1568c0..083f5fb33b 100644
--- a/docs/writing-tests.md
+++ b/docs/writing-tests.md
@@ -159,7 +159,14 @@ that are not included below.
       (expect (+ a 1) :to-throw 'void-variable))
     (it "optionally matches arguments to signals"
         (expect (+ a 1) :not :to-throw 'void-variable '(b))
-        (expect (+ a 1) :to-throw 'void-variable '(a)))))
+        (expect (+ a 1) :to-throw 'void-variable '(a)))
+       (it "matches inherited signals"
+         (expect (signal 'overflow-error nil) :to-throw 'overflow-error)
+         (expect (signal 'overflow-error nil) :to-throw 'arith-error)
+         (expect (signal 'overflow-error nil) :to-throw 'error)
+         (expect (signal 'arith-error nil) :not :to-throw 'overflow-error)
+         (expect (signal 'arith-error nil) :to-throw 'arith-error)
+         (expect (signal 'arith-error nil) :to-throw 'error))))
 ```
 
 If you are migrating from ERT, you can also use `should` and similar

Reply via email to