Sha256: afab5791e2ae878781bf0c45954db1f9909ea39a34cf08d6336209da9a85edef

Contents?: true

Size: 633 Bytes

Versions: 7

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'

module CodeClimate::TestReporter
  describe Client do
    it 'sets the http timeout per configuration' do
      new_timeout = 969
      CodeClimate::TestReporter.configure do |config|
        config.timeout = new_timeout
      end

      response = double(:response, code: 200)
      net_http = double(:net_http, request: response)
      allow(Net::HTTP).to receive(:new).
        and_return(net_http)

      expect(net_http).to receive(:open_timeout=).
        with(new_timeout)
      expect(net_http).to receive(:read_timeout=).
        with(new_timeout)

      Client.new.post_results("")
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
construi-0.6.0 vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb
construi-0.5.0 vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb
construi-0.4.0 vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb
construi-0.2.0 vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb
construi-0.1.0 vendor/bundle/ruby/1.9.1/gems/codeclimate-test-reporter-0.4.6/spec/lib/client_spec.rb
codeclimate-test-reporter-0.4.7 spec/lib/client_spec.rb
codeclimate-test-reporter-0.4.6 spec/lib/client_spec.rb