Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Add distribution method #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add test
Marc-Andre Giroux committed Feb 5, 2019
commit ec47a3e07a8ddf77d9c59489dda66096cd5f561b
7 changes: 7 additions & 0 deletions spec/statsd_spec.rb
Original file line number Diff line number Diff line change
@@ -68,6 +68,13 @@ class << @statsd
end
end

describe "#distribution" do
it "should format the message according to the statsd spec" do
@statsd.distribution('foobar', 500)
@statsd.shards.first.recv.must_equal ["foobar:500|d"]
end
end

describe "#time" do
it "should format the message according to the statsd spec" do
@statsd.time('foobar') { sleep(0.001); 'test' }