Last active
October 12, 2015 06:58
-
-
Save jaycfields/3988687 to your computer and use it in GitHub Desktop.
tests that use redef-state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns blog-expectations | |
(:use expectations | |
[blog :as b])) | |
(expect {"CNN" {:src "CNN" :headline "Election Update"} | |
"NY Times" {:src "NY Times" :headline "Movie Guide"}} | |
(redef-state [blog] | |
(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"}]} | |
(redef-state [blog] | |
(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