Skip to content

Commit

Permalink
Merge pull request jeremy#3 from j-manu/guage-spec-doc
Browse files Browse the repository at this point in the history
Document #gauge and test that namespacing works
  • Loading branch information
jeremy committed May 30, 2012
2 parents dafa6bb + 1528e8f commit 72af3af
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/statsd.rb
Expand Up @@ -7,6 +7,7 @@
# @example Send some stats
# $statsd.increment 'garets'
# $statsd.timing 'glork', 320
# $statsd.gauge 'bork', 100
# @example Use {#time} to time the execution of a block
# $statsd.time('account.activate') { @account.activate! }
# @example Create a namespaced statsd client and increment 'account.activate'
Expand Down
5 changes: 5 additions & 0 deletions spec/statsd_spec.rb
Expand Up @@ -183,6 +183,11 @@ class Statsd
@statsd.timing('foobar', 500)
@statsd.socket.recv.must_equal ['service.foobar:500|ms']
end

it "should add namespace to gauge" do
@statsd.gauge('foobar', 500)
@statsd.socket.recv.must_equal ['service.foobar:500|g']
end
end

describe "with logging" do
Expand Down

0 comments on commit 72af3af

Please sign in to comment.