Advertisement
Guest User

Clojure Expectations running out of order

a guest
Feb 24th, 2016
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ============ host_test.clj =================================================================
  2. (defn foo [dbc]
  3.   ($reset-db dbc)
  4.   (create-host-member dbc "Foo")
  5.   (expect 1 (count (sql/query dbc ["select * from member where username = ?" "Foo"]))))
  6.  
  7. (defn bar [dbc]
  8.   ($reset-db dbc)
  9.   (create-host-member dbc "Bar")
  10.   (expect 1 (count (sql/query dbc ["select * from member where username = ?" "Bar"]))))
  11.  
  12. (foo dbc)
  13. (bar dbc)
  14.  
  15. ============ Expectations output ============================================================
  16. failure in (host_test.clj:26) : backend.host-test
  17. (expect
  18.  1
  19.  (count
  20.   (sql/query dbc ["select * from member where username = ?" "Foo"])))
  21.  
  22.            expected: 1
  23.                 was: 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement