Skip to content

Instantly share code, notes, and snippets.

@jaycfields
Created October 31, 2012 17:35
Show Gist options
  • Save jaycfields/3988538 to your computer and use it in GitHub Desktop.
Save jaycfields/3988538 to your computer and use it in GitHub Desktop.
tests that kill state
(ns blog-expectations
(:use expectations
[blog :as b]))
(expect {"CNN" {:src "CNN" :headline "Election Update"}
"NY Times" {:src "NY Times" :headline "Movie Guide"}}
(do
(b/process-update {:src "NY Times" :headline "Market News"})
(b/process-update {:src "CNN" :headline "Election Update"})
(b/process-update {:src "NY Times" :headline "Movie Guide"})
@last-update))
(expect {"CNN" [{:src "CNN", :headline "Election Update"}]
"NY Times" [{:src "NY Times", :headline "Movie Guide"}
{:src "NY Times", :headline "Market News"}]}
(do
(b/process-update {:src "NY Times" :headline "Market News"})
(b/process-update {:src "CNN" :headline "Election Update"})
(b/process-update {:src "NY Times" :headline "Movie Guide"})
@all-updates))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment