-
I came across an issue with the use against-background in folded prerequisites. Let's say I'm testing these functions:
```
(defn square [x] (* x x))
(defn black-hole
"Throws an exception, ALWAYS!"…
-
I'm not sure what the exercise in 4.1 is asking me to do:
"Change the Point constructor to add x and y accessors."
What is an accessor? Is it like a 'get' method? Why would I need it if I can just u…
-
present in Natural Earth. Those are much more stable than a FID.
-
Or what am I missing here?
``` clojure
(def test (atom false))
(defn setup [what]
(if @what
(throw (IllegalArgumentException. "Already initialized!"))
(reset! test true)))
(defn teardown […
-
``` clojure
(fact
;; why does it think it has metadata with :foo in it?
(as-data-laden-falsehood [5]) => (comp :foo meta)
;; but this fails as you'd expect
((comp :foo meta) (as-data-laden-…
-
If you want to "call through" to the real function, you should be explicit about that, perhaps with this syntax:
``` clojure
(fact ...
(provided
(foo 3) => 4
foo => fall-back-to-existi…
-
Midje has a set of semi-manual compatibility tests. They're a pain to run, so they don't get run often enough. However:
> travis-ci.org is a hosted continuous integration system for the open
> source…
-
Running cake midje against a simple file containing one midje fact and one deftest test which both work separately (executed midje-mode and cake test respectively, I get:
java.lang.RuntimeException: …
maacl updated
12 years ago
-
This fails as expected:
(unfinished simplex? type-id timeslice)
(fact
(simplex? :type type-id
:time-lo timeslice
:time-high timeslice
:points [p0 p1 p2 p3…
-
The following produces a rather uninformative null pointer exception:
``` clojure
(fact (+ (rand) (rand) (rand)) => 25
(provided (rand) =streams=> [15 10]))
```
In general, what's the best way…