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