Skip to content

Commit 4a1d341

Browse files
author
Shulang Lei
committed
Pull in generative testing deps
1 parent 4ec25de commit 4a1d341

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

project.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
(defproject com.unbounce/clojure-dogstatsd-client "0.1.1"
1+
(defproject com.unbounce/clojure-dogstatsd-client "0.1.2-SNAPSHOT"
22
:description "A thin veneer over java-dogstatsd-client"
33
:url "https://github.com/unbounce/clojure-dogstatsd-client"
4-
:license {:name "The MIT License (MIT)"
5-
:url "http://opensource.org/licenses/MIT"
4+
:license {:name "The MIT License (MIT)"
5+
:url "http://opensource.org/licenses/MIT"
66
:comments "Copyright (c) 2018 Unbounce Marketing Solutions Inc."}
7+
:profiles {:dev {:dependencies [[org.clojure/test.check "0.9.0"]]}}
78
:dependencies [[org.clojure/clojure "1.9.0"]
89
[com.datadoghq/java-dogstatsd-client "2.5"]]
910
:global-vars {*warn-on-reflection* true})

test/com/unbounce/dogstatsd/core_test.clj

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,32 @@
55
[clojure.spec.test.alpha :as stest]))
66

77
(s/def ::sample-rate number?)
8-
(s/def ::tags (s/coll-of string?))
8+
(s/def ::metric string?)
9+
(s/def ::tags (s/coll-of string? :kind vector?))
910
(s/def ::opts (s/keys :req-un [::tags ::sample-rate]))
11+
(s/def ::opts* (s/keys* :req-un [::tags ::sample-rate]))
1012

1113
(s/fdef sut/str-array
12-
:args (s/cat :tags ::tags)
14+
:args (s/or :tags (s/cat :tags ::tags)
15+
:no-tag (s/cat :tags nil?))
1316
:ret #(instance? java.lang.Object %))
1417

1518
(s/fdef sut/increment
16-
:args (s/cat :metric string?
17-
:opts (s/* (s/alt :_ (s/cat :_ (partial = :tags)
18-
:_ ::tags)
19-
:_ (s/cat :_ (partial = :sample-rate)
20-
:_ ::sample-rate))))
19+
:args (s/cat :metric ::metric
20+
:opts ::opts*)
2121
:ret nil?)
2222

2323
(s/fdef sut/decrement
24-
:args (s/cat :metric string?
25-
:opts (s/* (s/alt :_ (s/cat :_ (partial = :tags)
26-
:_ ::tags)
27-
:_ (s/cat :_ (partial = :sample-rate)
28-
:_ ::sample-rate))))
24+
:args (s/cat :metric ::metric
25+
:opts ::opts*)
2926
:ret nil?)
3027

31-
3228
(s/fdef sut/gauge
3329
:args (s/cat :metric string?
3430
:value number?
3531
:opts ::opts)
3632
:ret nil?)
3733

38-
3934
(s/fdef sut/histogram
4035
:args (s/cat :metric string?
4136
:value number?

0 commit comments

Comments
 (0)