Sha256: 1c8438794388b88f4ae8172e9adc3d6d206e50b701c2b734d9cf64e6e4fd67e1

Contents?: true

Size: 704 Bytes

Versions: 16

Compression:

Stored size: 704 Bytes

Contents

require 'spec_helper'

require 'saddle/middleware/logging/statsd'


describe Saddle::Middleware::Logging::StatsdLogger do

  context "test Statsd middleware" do

    it "with a request" do
      class StatsdClient < Saddle::Client
        add_middleware({
          :klass => Saddle::Middleware::Logging::StatsdLogger,
          :args => ['127.0.0.1'],
        })
      end

      client = StatsdClient.create(
        :stubs => Faraday::Adapter::Test::Stubs.new do |stub|
          stub.get('/test') {
            [
              200,
              {},
              'Party on!',
            ]
          }
        end
      )
      client.requester.get('/test').should == 'Party on!'
    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
saddle-0.0.50 spec/middleware/logging/statsd_spec.rb
saddle-0.0.49 spec/middleware/logging/statsd_spec.rb
saddle-0.0.48 spec/middleware/logging/statsd_spec.rb
saddle-0.0.46 spec/middleware/logging/statsd_spec.rb
saddle-0.0.45 spec/middleware/logging/statsd_spec.rb
saddle-0.0.44 spec/middleware/logging/statsd_spec.rb
saddle-0.0.43 spec/middleware/logging/statsd_spec.rb
saddle-0.0.42 spec/middleware/logging/statsd_spec.rb
saddle-0.0.41 spec/middleware/logging/statsd_spec.rb
saddle-0.0.38 spec/middleware/logging/statsd_spec.rb
saddle-0.0.37 spec/middleware/logging/statsd_spec.rb
saddle-0.0.36 spec/middleware/logging/statsd_spec.rb
saddle-0.0.35 spec/middleware/logging/statsd_spec.rb
saddle-0.0.34 spec/middleware/logging/statsd_spec.rb
saddle-0.0.33 spec/middleware/logging/statsd_spec.rb
saddle-0.0.32 spec/middleware/logging/statsd_spec.rb