marick/Midje — Issue #97: (background (before :contents ...)) doesn't work
Author: the-kenny
Created: 2012-02-03 00:26:04+00:00
State: open

I see some strange behavior with :contents setup and teardown. Let me show a simple test case:

```clojure
(ns test.foo (:use midje.sweet))

(def at (atom 0))

(background (before :contents (swap! at inc))
(after :contents (swap! at dec)))

;.;. FAIL at (NO_SOURCE_FILE:2)
;.;. Expected: 1
;.;. Actual: 0
(fact @at => 1)

;.;. efforts will inevitably bring about right results. -- Allen
(against-background [(before :contents (swap! at inc))
(after :contents (swap! at dec))]
(fact @at => 1))
```

Why does the the fact using `against-background` work fine while the same fact using `background` fails?