branch: scratch/el-mock
commit 5fb2867d2e0350dda047a903ce60d264f78ef424
Merge: 68992d4361 280e988956
Author: Johan Andersson <johan.rej...@gmail.com>
Commit: GitHub <nore...@github.com>

    Merge pull request #15 from gabrielmdeal/master
    
    Add more documentation to README.md
---
 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
 

Reply via email to