File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
library/socket/unixsocket Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 44with_feature :unix_socket do
55 describe 'UNIXSocket#initialize' do
66 describe 'using a non existing path' do
7- it 'raises Errno::ENOENT' do
8- -> { UNIXSocket . new ( SocketSpecs . socket_path ) } . should raise_error ( Errno ::ENOENT )
7+ platform_is_not :windows do
8+ it 'raises Errno::ENOENT' do
9+ -> { UNIXSocket . new ( SocketSpecs . socket_path ) } . should raise_error ( Errno ::ENOENT )
10+ end
11+ end
12+
13+ platform_is :windows do
14+ # Why, Windows, why?
15+ it 'raises Errno::ECONNREFUSED' do
16+ -> { UNIXSocket . new ( SocketSpecs . socket_path ) } . should raise_error ( Errno ::ECONNREFUSED )
17+ end
918 end
1019 end
1120
Original file line number Diff line number Diff line change 3030 end
3131
3232 platform_is :windows do
33- it "emulates abstract sockets with a temporary file with a path" do
33+ it "emulates unnamed sockets with a temporary file with a path" do
3434 @s1 . path . match? ( /\\ AppData\\ Local\\ Temp\\ \d +-\d +\. \( \$ \) \z / ) . should be_true
3535 @s1 . addr . should == [ "AF_UNIX" , @s1 . path ]
3636 @s2 . peeraddr . should == [ "AF_UNIX" , @s1 . path ]
You can’t perform that action at this time.
0 commit comments