Skip to content

Commit 3ab8d84

Browse files
herwinweregon
authored andcommitted
Cleanup of afamily/pfamily specs for Addrinfo#initialize
It looks like there was a lot of copy-paste in this one, often the description did not match the actual test. The descriptions have been updated to use the shortest human readable syntax, so no `Socket::` namespace and no `PF_` prefix to the name. This matches the afamily specs (or: most of them). Additionally, a few additional spaces in the descriptions have been removed.
1 parent a7f0aac commit 3ab8d84

1 file changed

Lines changed: 16 additions & 16 deletions

File tree

library/socket/addrinfo/initialize_spec.rb

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@addrinfo.ip_port.should == 25
1818
end
1919

20-
it "returns the Socket::UNSPEC pfamily" do
20+
it "returns the UNSPEC pfamily" do
2121
@addrinfo.pfamily.should == Socket::PF_UNSPEC
2222
end
2323

@@ -53,7 +53,7 @@
5353
@addrinfo.ip_port.should == 25
5454
end
5555

56-
it "returns the Socket::UNSPEC pfamily" do
56+
it "returns the INET6 pfamily" do
5757
@addrinfo.pfamily.should == Socket::PF_INET6
5858
end
5959

@@ -83,7 +83,7 @@
8383
@addrinfo.ip_port.should == 25
8484
end
8585

86-
it "returns the Socket::UNSPEC pfamily" do
86+
it "returns the INET6 pfamily" do
8787
@addrinfo.pfamily.should == Socket::PF_INET6
8888
end
8989

@@ -113,7 +113,7 @@
113113
@addrinfo.ip_port.should == 25
114114
end
115115

116-
it "returns the Socket::UNSPEC pfamily" do
116+
it "returns the INET6 pfamily" do
117117
@addrinfo.pfamily.should == Socket::PF_INET6
118118
end
119119

@@ -147,11 +147,11 @@
147147
@addrinfo.ip_port.should == 46102
148148
end
149149

150-
it "returns the Socket::PF_INET pfamily" do
150+
it "returns the INET pfamily" do
151151
@addrinfo.pfamily.should == Socket::PF_INET
152152
end
153153

154-
it "returns the INET6 afamily" do
154+
it "returns the INET afamily" do
155155
@addrinfo.afamily.should == Socket::AF_INET
156156
end
157157

@@ -217,11 +217,11 @@
217217
@addrinfo.ip_port.should == 46102
218218
end
219219

220-
it "returns the Socket::UNSPEC pfamily" do
220+
it "returns the INET pfamily" do
221221
@addrinfo.pfamily.should == Socket::PF_INET
222222
end
223223

224-
it "returns the INET6 afamily" do
224+
it "returns the INET afamily" do
225225
@addrinfo.afamily.should == Socket::AF_INET
226226
end
227227

@@ -247,11 +247,11 @@
247247
@addrinfo.ip_port.should == 46102
248248
end
249249

250-
it "returns the Socket::UNSPEC pfamily" do
250+
it "returns the INET pfamily" do
251251
@addrinfo.pfamily.should == Socket::PF_INET
252252
end
253253

254-
it "returns the INET6 afamily" do
254+
it "returns the INET afamily" do
255255
@addrinfo.afamily.should == Socket::AF_INET
256256
end
257257

@@ -311,11 +311,11 @@
311311
@addrinfo.ip_port.should == 46102
312312
end
313313

314-
it "returns the Socket::UNSPEC pfamily" do
314+
it "returns the INET pfamily" do
315315
@addrinfo.pfamily.should == Socket::PF_INET
316316
end
317317

318-
it "returns the INET6 afamily" do
318+
it "returns the INET afamily" do
319319
@addrinfo.afamily.should == Socket::AF_INET
320320
end
321321

@@ -514,13 +514,13 @@
514514
@sockaddr = Socket.sockaddr_in(80, '127.0.0.1')
515515
end
516516

517-
it 'returns an Addrinfo with :PF_INET family' do
517+
it 'returns an Addrinfo with :PF_INET family' do
518518
addr = Addrinfo.new(@sockaddr, :PF_INET)
519519

520520
addr.pfamily.should == Socket::PF_INET
521521
end
522522

523-
it 'returns an Addrinfo with :INET family' do
523+
it 'returns an Addrinfo with :INET family' do
524524
addr = Addrinfo.new(@sockaddr, :INET)
525525

526526
addr.pfamily.should == Socket::PF_INET
@@ -544,13 +544,13 @@
544544
@sockaddr = Socket.sockaddr_in(80, '127.0.0.1')
545545
end
546546

547-
it 'returns an Addrinfo with "PF_INET" family' do
547+
it 'returns an Addrinfo with "PF_INET" family' do
548548
addr = Addrinfo.new(@sockaddr, 'PF_INET')
549549

550550
addr.pfamily.should == Socket::PF_INET
551551
end
552552

553-
it 'returns an Addrinfo with "INET" family' do
553+
it 'returns an Addrinfo with "INET" family' do
554554
addr = Addrinfo.new(@sockaddr, 'INET')
555555

556556
addr.pfamily.should == Socket::PF_INET

0 commit comments

Comments
 (0)