Sha256: 5110d590603def637c94d8fd26c361ffd7bb34dfd8d83260c2889d95047f0eaa

Contents?: true

Size: 675 Bytes

Versions: 5

Compression:

Stored size: 675 Bytes

Contents

require 'spec_helper'
require 'lookout/rack/utils/graphite'

describe Lookout::Rack::Utils::Graphite do
  subject(:graphite) { described_class }

  before :each do
    graphite.instance # Initialize statsd singleton
    configatron.statsd.stub(:prefix).and_return('test')
  end

  context 'offers statsd methods' do
    it { should respond_to :increment }
    it { should respond_to :decrement }
    it { should respond_to :timing }
    it { should respond_to :update_counter }
  end

  it 'should delegate to statsd' do
    Statsd.instance.should_receive(:increment).once.with('device.associated')
    Lookout::Rack::Utils::Graphite.increment('device.associated')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lookout-rack-utils-1.2.4 spec/graphite_spec.rb
lookout-rack-utils-1.2.3 spec/graphite_spec.rb
lookout-rack-utils-1.2.2 spec/graphite_spec.rb
lookout-rack-utils-1.2.1 spec/graphite_spec.rb
lookout-rack-utils-1.2.0 spec/graphite_spec.rb