Skip to content

Instantly share code, notes, and snippets.

@dmitrig01
Created March 24, 2015 22:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitrig01/b7eac75c3a2b0d98ce78 to your computer and use it in GitHub Desktop.
Save dmitrig01/b7eac75c3a2b0d98ce78 to your computer and use it in GitHub Desktop.
(ns midje-test.a)
(defprotocol A (a [_]))
(ns midje-test.core
(:require [midje.open-protocols :refer [defrecord-openly]]
[midje-test.a :refer [A]]))
(defrecord-openly B []
A
(a [_] (prn "something")))
;; this becomes
;; (clojure.core/defrecord B []
;; A
;; (a
;; [_]
;; (if
;; (midje.data.prerequisite-state/implements-a-fake? a) <-- obviously "a" is not defined here
;; (clojure.core/apply a [_]) <-- nor here
;; (do (prn "something")))))
(defn -main [& args]
(prn "hi"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment