Sha256: 84f7c1f787a3a90dc3dd2fce681177693504bf59bc12a5f1c9b513f1a9f1b32e

Contents?: true

Size: 532 Bytes

Versions: 19

Compression:

Stored size: 532 Bytes

Contents

require "spec_helper"

describe ApiClient::Connection::Middlewares::Request::Logger do

  it "adds a oauth header to the request" do
    app      = mock
    logger   = FakeLogger.new
    instance = ApiClient::Connection::Middlewares::Request::Logger.new(app, logger)
    env = {
      :url => "http://api.twitter.com",
      :request_headers => {},
      :method => 'get'
    }
    app.should_receive(:call).with(env)
    instance.call(env)
    logger.history.first.should == "GET http://api.twitter.com: 0.0000 seconds"
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
api_client-0.4.3 spec/api_client/connection/request/logger_spec.rb
api_client-0.4.2 spec/api_client/connection/request/logger_spec.rb
api_client-0.4.1 spec/api_client/connection/request/logger_spec.rb
api_client-0.3.3 spec/api_client/connection/request/logger_spec.rb
api_client-0.4.0 spec/api_client/connection/request/logger_spec.rb
api_client-0.3.2 spec/api_client/connection/request/logger_spec.rb
api_client-0.3.1 spec/api_client/connection/request/logger_spec.rb
api_client-0.3.0 spec/api_client/connection/request/logger_spec.rb
api_client-0.2.0 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.9 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.8 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.7 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.6 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.5 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.4 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.3 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.2 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.1 spec/api_client/connection/request/logger_spec.rb
api_client-0.1.0 spec/api_client/connection/request/logger_spec.rb