Skip to content

Commit

Permalink
Pulled things into fact.clj
Browse files Browse the repository at this point in the history
  • Loading branch information
marick committed Jul 25, 2011
1 parent 4f018dd commit 38ce975
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
16 changes: 16 additions & 0 deletions src/midje/fact.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(ns midje.fact
(:use [midje.util.form-utils :only [form-first?]])
)

(defn fact? [form]
(or (form-first? form "fact")
(form-first? form "facts")))
(defn future-fact? [form]
(or (form-first? form "future-fact")
(form-first? form "future-facts")
(form-first? form "pending-fact")
(form-first? form "pending-facts")
(form-first? form "incipient-fact")
(form-first? form "incipient-facts")
(form-first? form "antiterminologicaldisintactitudinarian-fact")
(form-first? form "antiterminologicaldisintactitudinarian-facts")))
21 changes: 0 additions & 21 deletions src/midje/midje_forms/recognizing.clj
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,10 @@
[midje.util.unify :as unify]
[midje.util.wrapping :as wrapping]))

;; Zipper vs. form agnostic


(defn is-head-of-form-providing-prerequisites? [loc]
(namespacey-match '(provided) loc))



;; Clojure.zip trees

;; Wrapping

(defn fact? [form]
(or (form-first? form "fact")
(form-first? form "facts")))
(defn future-fact? [form]
(or (form-first? form "future-fact")
(form-first? form "future-facts")
(form-first? form "pending-fact")
(form-first? form "pending-facts")
(form-first? form "incipient-fact")
(form-first? form "incipient-facts")
(form-first? form "antiterminologicaldisintactitudinarian-fact")
(form-first? form "antiterminologicaldisintactitudinarian-facts")))

;;; background forms

(defn seq-headed-by-setup-teardown-form? [forms]
Expand Down
3 changes: 1 addition & 2 deletions src/midje/midje_forms/translating.clj
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
background-form?]]
[midje.semi-sweet :only [is-semi-sweet-keyword?]]
[midje.util.wrapping :only [already-wrapped?]]
[midje.fact :only [fact? future-fact?]]
[midje.midje-forms.recognizing :only [
fact?
fake-form-funcall-arglist
fake-that-needs-unfolding?
future-fact?
is-head-of-form-providing-prerequisites?
mockable-funcall?
seq-headed-by-setup-teardown-form?]]
Expand Down

0 comments on commit 38ce975

Please sign in to comment.