Sha256: 9338486af4643a43d8671e31272fa8c29f32dc755ebea5b9f403dd2347106ea3

Contents?: true

Size: 667 Bytes

Versions: 3

Compression:

Stored size: 667 Bytes

Contents

require 'saddle'
require 'saddle/middleware/logging/rails'



describe Saddle::Middleware::Logging::RailsLogger do

  context "test Rails logging middleware" do

    it "with a request" do
      class RailsClient < Saddle::Client
        add_middleware({
          :klass => Saddle::Middleware::Logging::RailsLogger,
        })
      end

      client = RailsClient.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

3 entries across 3 versions & 1 rubygems

Version Path
saddle-0.0.31 spec/middleware/logging/rails_spec.rb
saddle-0.0.30 spec/middleware/logging/rails_spec.rb
saddle-0.0.27 spec/middleware/logging/rails_spec.rb