Sha256: 8a184e97141d91c22639338796d00c88714364bdc731d8f4d622f773faae6960

Contents?: true

Size: 579 Bytes

Versions: 15

Compression:

Stored size: 579 Bytes

Contents

require 'rspec'
require 'hyperion'

describe HyperionResult do
  describe '#to_s' do
    let!(:route) { RestRoute.new(:get, 'http://site.com/things') }
    it 'returns something reasonable' do
      verify_to_s(HyperionStatus::TIMED_OUT, nil, "Timed out: #{route.to_s}")
      verify_to_s(HyperionStatus::CLIENT_ERROR, 400, "Client error: #{route.to_s}")
      verify_to_s(HyperionStatus::CHECK_CODE, 321, "HTTP 321: #{route.to_s}")
    end

    def verify_to_s(status, code, expected)
      expect(HyperionResult.new(route, status, code).to_s).to eql expected
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hyperion_http-0.6.0 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.5.0 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.3.0 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.2.4 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.2.3 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.2.2 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.2.1 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.9 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.8 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.7 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.6 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.5 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.4 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.3 spec/lib/hyperion/types/hyperion_result_spec.rb
hyperion_http-0.1.2 spec/lib/hyperion/types/hyperion_result_spec.rb