Fork me on GitHub
#midje
<
2017-03-07
>
caio21:03:20

trying to do this:

(fact "contains should work when nesting"
      (-> ..col.. (get 0) :k) => ..v..
      (provided
        ..col.. =contains=> [..m..]
        ..m.. =contains=> {:k ..v..}))
but getting this:
"contains should work when nesting" at (bla.clj:2)
    Expected: ..v..
      Actual: nil

caio21:03:30

is that the expected behavior?

ejelome21:03:44

actual => expected

ejelome21:03:12

the Actual is the value returned by the function you used, the Expected is the value you specified

caio21:03:16

hm, not sure if I understood, but this is valid code:

(fact (:k ..m..) => ..v..
         (provided ..m.. =contains=> {:k ..v..}))

caio21:03:36

the problem is that it doesn't work when you nest a metaconstant inside another with =contains=>