(fact "Checking :time has been removed"
(remove-date [{:time 1 :a 2} {:c 3 :time 4}]) => (seq '({:a 2} {:c 4})))
在上面的测试中,remove-date
函数返回一个seq ({:a 2} {:c 4})
如何在右侧表示seq? (以上不起作用)
答案 0 :(得分:0)
以上对我有用,你的断言中的{:c 4}错了。它应该是{:c 3}。
(fact "Checking :time has been removed"
(remove-date [{:time 1 :a 2} {:c 3 :time 4}]) => (seq '({:a 2} {:c 3})))
事实上,您不需要seq
来电:
(fact "Checking :time has been removed"
(remove-date [{:time 1 :a 2} {:c 3 :time 4}]) => '({:a 2} {:c 3}))
我用midje 1.5.0和clojure 1.4.0
测试了它