-
Notifications
You must be signed in to change notification settings - Fork 0
/
math_test.clj
28 lines (22 loc) · 982 Bytes
/
math_test.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(ns math-test
(:require [clojure.test :refer :all]
[clj-concordion.core :as cc]))
; (io.aviso.repl/install-pretty-exceptions)
(defn parse-int [s]
(Integer/parseInt s))
(defn multiply
"Called by Concordion"
[n1, n2]
(int (* (parse-int n1) (parse-int n2))))
(defn subtract
"Called by Concordion"
[n1, n2]
(int (- (parse-int n1) (parse-int n2))))
(cc/deffixture Algebra
{:cc/before-suite #(println "AlgebraFixture: I run before each Suite")
:cc/before-spec #(println "AlgebraFixture: I run before each Spec")
:cc/before-example #(println "AlgebraFixture: I run before each example" %)
:cc/after-example #(println "AlgebraFixture: I run after each example" %)
:cc/after-spec #(println "AlgebraFixture: I run after each Spec")
:cc/after-suite #(println "AlgebraFixture: I run after each Suite")})
(use-fixtures :once cc/cljtest-reset-concordion)