Skip to content

Commit

Permalink
test resolve-return
Browse files Browse the repository at this point in the history
  • Loading branch information
scgilardi committed Mar 26, 2012
1 parent f08c442 commit b2b6453
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/robert/test/bruce.clj
Expand Up @@ -29,6 +29,13 @@
(is (= Math/E ((:decay (resolve-decay {:decay :exponential})) 1)))
(is (= 1.6180339887 ((:decay (resolve-decay {:decay :golden-ratio})) 1)))))

(deftest test-return?
(testing "return? allows nothing, a function, or a keyword"
(is (= always ((resolve-return {}) :return?)))
(is (= always ((resolve-return {:return? :always}) :return?)))
(is (= truthy? ((resolve-return {:return? :truthy?}) :return?)))
(is (= falsey? ((resolve-return {:return? :falsey?}) :return?)))
(is (= true? ((resolve-return {:return? true?}) :return?)))))

(deftest test-parse
(testing "parse handles a variety of arguments correctly"
Expand Down

0 comments on commit b2b6453

Please sign in to comment.