nested checkers

9 views
Skip to first unread message

David Kincaid

unread,
Dec 17, 2015, 8:02:13 PM12/17/15
to Midje
I'm having trouble with a nested checker and think I must be doing something wrong. Here is a very simple example:

(fact [["this" 0.49315068]] => [["this" (roughly 0.49315)]])

FAIL at (*cider-repl lambda-clients*:657)
    Expected: [["this" #function[clojure.lang.AFunction/1]]]
      Actual: [["this" 0.49315068]]
       Diffs: in [0 1] expected #function[clojure.lang.AFunction/1], was 0.49315068
false

I tried wrapping it in a just too:
(fact [["this" 0.49315068]] => (just [["this" (roughly 0.49315)]]))

FAIL at (*cider-repl lambda-clients*:663)
Actual result did not agree with the checking function.
        Actual result: [["this" 0.49315068]]
    Checking function: (just [["this" (roughly 0.49315)]])
    The checker said this about the reason:
        Best match found: []
false

should these be working and I'm just doing something dumb or is this not expected to work? 

Thanks,

Dave

David Kincaid

unread,
Dec 17, 2015, 8:09:22 PM12/17/15
to Midje
Sorry about that. I found my answer in the strangest place - under "nested checkers" on the Wiki. Should have gone to the Wiki first. Sorry to waste your time.

Thanks for such a great tool.

- Dave
Reply all
Reply to author
Forward
0 new messages