Semi sweet mode

marick edited this page Dec 22, 2010 · 1 revision
Clone this wiki locally

Namespace midje.semi-sweet contains macros that provide less syntactic sugaring than those from midje.sweet. midje.sweet is built on top of it.

Here's a simple semi-sweet test:

     (expect (numerical-reverser 103) => 301)

Prerequisites for an expect use the fake macro:

    (expect (numerical-reverser 103) => 301
       (fake (string-reverser "103") => "301"))

Notice that the fake forms are within the body of the expect call, not following it.

You can find a complete set of examples for the semi-sweet style here.