Last active
April 8, 2016 19:07
-
-
Save becca-bailey/46c914d20887eba9d250a020c8a7860f to your computer and use it in GitHub Desktop.
Clojure.test example
This file contains 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
(deftest returns-empty | |
(testing "Coin changer returns an empty collection if no cents are given" | |
(is (empty? (make-change 0))))) | |
(deftest returns-1-penny | |
(testing "Coin changer returns 1 penny if 1 cents are given" | |
(is (= [1] (make-change 1))))) | |
(deftest returns-2-pennies | |
(testing "Coin changer returns 2 pennies if 2 cents are given" | |
(is (= [1 1] (make-change 2))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment