Skip to content

Commit

Permalink
tests for HAS-ALL-THE-AWARDS that don't assume a fixed awards set
Browse files Browse the repository at this point in the history
  • Loading branch information
Jani Rahkola committed Mar 7, 2013
1 parent 85d032e commit 4d6c883
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
# predicates

A Clojure library designed to ... well, that part is up to you.
I'm part of the [120 hour epic sax marathon](http://iloveponies.github.com/120-hour-epic-sax-marathon/).

## Usage

FIXME

## License

Copyright © 2012 FIXME

Distributed under the Eclipse Public License, the same as Clojure.
Make a fork of me!
9 changes: 3 additions & 6 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
(defproject predicates "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.4.0"]]
:profiles {:dev {:dependencies [[midje "1.4.0"]
[com.stuartsierra/lazytest "1.2.3"]]
:plugins [[lein-midje "2.0.0-SNAPSHOT"]]}}
:repositories {"stuart" "http://stuartsierra.com/maven2"}
:url "http://example.com/FIXME")
:dependencies [[org.clojure/clojure "1.5.0"]]
:profiles {:dev {:dependencies [[midje "1.5-RC1"]]
:plugins [[lein-midje "3.0-RC1"]]}})
16 changes: 12 additions & 4 deletions test/predicates_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,18 @@
(has-award? scanner-darkly :hugo) => false)

(facts "HAS-ALL-THE-AWARDS?"
(HAS-ALL-THE-AWARDS? cities awards) => true
(HAS-ALL-THE-AWARDS? lord-of-light awards) => false
(HAS-ALL-THE-AWARDS? lord-of-light #{:hugo}) => true
(HAS-ALL-THE-AWARDS? scanner-darkly #{}) => true)
(HAS-ALL-THE-AWARDS? cities #{:locus})
=> true
(HAS-ALL-THE-AWARDS? cities #{:locus :world-fantasy :hugo})
=> true
(HAS-ALL-THE-AWARDS? cities #{:locus :world-fantasy :hugo :pulitzer})
=> false
(HAS-ALL-THE-AWARDS? lord-of-light #{:locus :world-fantasy :hugo})
=> false
(HAS-ALL-THE-AWARDS? lord-of-light #{:hugo})
=> true
(HAS-ALL-THE-AWARDS? scanner-darkly #{})
=> true)

(facts "my-some"
(my-some even? [1 3 5 7]) => falsey
Expand Down

0 comments on commit 4d6c883

Please sign in to comment.