spec/kamerling/addr_spec.rb in kamerling-0.0.1 vs spec/kamerling/addr_spec.rb in kamerling-0.0.2

- old
+ new

@@ -17,9 +17,15 @@ splat = *addr splat.must_equal ['localhost', 1981] end end + describe '#to_h' do + it 'returns a Hash with Integer and String values' do + addr.to_h.must_equal host: 'localhost', port: 1981, prot: 'TCP' + end + end + describe '#to_s' do it 'returns the Addr in ‘host:port (protocol)’ notation' do addr.to_s.must_equal 'localhost:1981 (TCP)' end end