Instantly share code, notes, and snippets.

Embed
What would you like to do?
;;; widget-test.el --- tests the widget elisp
;;; Commentary:
;;
;; To test widget.el:
;; 1. Navigate to widget.el
;; 2. M-x eval-buffer
;; 3. Navigate to widget-test.el
;; 4. M-x eval-buffer
;; 5. M-x ert <RET> t <RET>
;; 6. ???
;; 7. Is there a better way than this?
(load-file "widget.el")
;;; Code:
(ert-deftest test-do-foo ()
"do-foo should return a string 'foo'"
(should
(string-equal "foo" (do-foo))))
(ert-deftest test-do-bar ()
(should
(string-equal "bar" (do-bar))))
(provide 'widget-test)
;;; widget-test.el ends here
;;; widget.el --- the widget for getting useful strings
;;; Commentary:
;;; Code:
(defun do-foo ()
"foo")
(defun do-bar ()
"")
(provide 'widget)
;;; widget.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment