Skip to content

Instantly share code, notes, and snippets.

@semperos
Created October 10, 2012 21:37
Show Gist options
  • Select an option

  • Save semperos/3868613 to your computer and use it in GitHub Desktop.

Select an option

Save semperos/3868613 to your computer and use it in GitHub Desktop.
Temp
;; Functional programming
(is (= "Item 'Foo' deleted successfully"
(text "div.message")))
(is (some #{"Item 'Foo' deleted successfully"}
(apply text (elements "div.message"))))
(is (= (count (elements "div.message")) 1))
;; Logic programming
(s (run* [q]
(fresh [el text]
(attributeo el "class" "message")
(texto el text)
(== q text))))
(s-as "Item 'Foo' deleted successfully"
(run* [q]
(fresh [el text]
(attributeo el "class" "message")
(texto el text)
(== q text))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment