Namespaces

 
0.1.1 permalink Arrow_down_16x16
  • (expect call-form => expected-result & expectations)
Run the call form, check that all the mocks defined in the expectations
(probably with 'fake') have been satisfied, and check that the actual
results are as expected. If the expected results are a function, it
will be called with the actual result as its single argument.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source midje/semi_sweet.clj:45 top

(defmacro expect 
  "Run the call form, check that all the mocks defined in the expectations 
   (probably with 'fake') have been satisfied, and check that the actual
   results are as expected. If the expected results are a function, it
   will be called with the actual result as its single argument."
  [call-form => expected-result & expectations]
   `(let [call# (call-being-tested ~call-form ~expected-result)]
      (expect* call# (vector ~@expectations)))
)
Vars in midje.semi-sweet/expect: defmacro apply concat let list seq vector
Used in 0 other vars

Comments top

No comments for expect. Log in to add a comment.