-
-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
two-fer: add generator and regenerate tests
- Loading branch information
1 parent
b866e68
commit a81cbea
Showing
2 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns two-fer-test | ||
(:require [clojure.test :refer [deftest testing is]] | ||
two-fer)) | ||
{{#test_cases.twoFer}} | ||
(deftest two-fer_test_{{idx}} | ||
(testing "{{description}}" | ||
(is (= "{{expected}}" (two-fer/two-fer{{#input.name}} "{{input.name}}"{{/input.name}}))))) | ||
{{/test_cases.twoFer}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
(ns two-fer-test | ||
(:require [clojure.test :refer [deftest is]] | ||
two-fer)) | ||
(:require [clojure.test :refer [deftest testing is]] | ||
two-fer)) | ||
|
||
(deftest two-fer-test | ||
(is (= "One for you, one for me." (two-fer/two-fer)))) | ||
(deftest two-fer_test_1 | ||
(testing "no name given" | ||
(is (= "One for you, one for me." (two-fer/two-fer))))) | ||
|
||
(deftest name-alice-test | ||
(is (= "One for Alice, one for me." (two-fer/two-fer "Alice")))) | ||
(deftest two-fer_test_2 | ||
(testing "a name given" | ||
(is (= "One for Alice, one for me." (two-fer/two-fer "Alice"))))) | ||
|
||
(deftest two-fer_test_3 | ||
(testing "another name given" | ||
(is (= "One for Bob, one for me." (two-fer/two-fer "Bob"))))) | ||
|
||
(deftest name-bob-test | ||
(is (= "One for Bob, one for me." (two-fer/two-fer "Bob")))) |