This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun find-java-src () | |
(interactive) | |
(er/mark-word) | |
(let* ((project-root (locate-dominating-file (file-name-directory (buffer-file-name)) "project.clj")) | |
(the-str (buffer-substring-no-properties (region-beginning) (region-end)))) | |
(if project-root | |
(progn | |
(grep-string-in the-str | |
(concat project-root "lib/sources")) | |
(switch-to-grep) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(expect (interaction (log :warn anything&)) | |
(log :warn "order" 1 "at" (time/now))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(expect (interaction (my-fn anything&) :never) | |
(a-fn-that-shouldnt-call-my-fn)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(expect (interaction (my-fn anything) :never) | |
(a-fn-that-shouldnt-call-my-fn)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns success.success-examples | |
(:use expectations erajure.core)) | |
;; mock interaction based testing | |
(expect-let [r (mock Runnable)] | |
(interaction (.run r)) | |
(.run r)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns synchro.core) | |
;; server | |
(defonce server-list (atom [])) | |
(defonce appender (atom nil)) | |
(defonce appending-fiber (atom nil)) | |
(defonce subscriber (atom identity)) | |
(defonce synchro-fiber (atom nil)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns synchro.core) | |
;; server | |
(defonce server-list (atom [])) | |
(defonce appender (atom nil)) | |
(defonce appending-fiber (atom nil)) | |
(defonce subscriber (atom identity)) | |
(defn subscribe [f] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns synchro.core) | |
;; server | |
(defonce server-list (atom [])) | |
(defonce appender (atom nil)) | |
(defonce appending-fiber (atom nil)) | |
(defonce subscriber (atom identity)) | |
(defn subscribe [f] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; client | |
(defonce client-list (atom nil)) | |
(defn handle-update [{:keys [type val]}] | |
(if (= type :snapshot) | |
(reset! client-list val) | |
(when @client-list | |
(when (< 9 (count @client-list)) | |
(swap! client-list butlast)) | |
(swap! client-list conj val)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; server | |
(defonce server-list (atom [])) | |
(defonce appender (atom nil)) | |
(defonce appending-fiber (atom nil)) | |
(defonce subscriber (atom identity)) | |
(defn subscribe [f] | |
(reset! subscriber f)) |