branch: scratch/el-mock commit 280e988956704af1840c455d512da9b9dbd0ad48 Author: Gabriel M Deal <gabr...@dicksonlabs.com> Commit: Gabriel M Deal <gabr...@dicksonlabs.com>
Add more documentation to README.md Add a small example. Add pointers to the full API documentation. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4af180ceff..9ed344f90c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,20 @@ Add this to your test-helper, [for instance](https://github.com/rejeep/prodigy.e (require 'cl)) ;; for el-mock ``` +An example of a simple mock that displays "/mocked/file/name.el": +``` +(with-mock + (stub buffer-file-name => "/mocked/file/name.el") + (display-message-or-buffer (buffer-file-name))) +``` + +## Documentation + +Find the documentation at `M-x describe-function RET with-mock RET` +and `M-x describe-function RET mocklet RET`. + +The old documentation is at https://www.emacswiki.org/emacs/EmacsLispMock + ## Contribution