summaryrefslogtreecommitdiff
path: root/spec/ruby/library/socket/basicsocket
diff options
context:
space:
mode:
authorBenoit Daloze <[email protected]>2021-10-05 19:41:44 +0200
committerBenoit Daloze <[email protected]>2021-10-05 19:41:44 +0200
commitb9f34062f00d1d2548ca9b6af61a6447c2d0f8e3 (patch)
tree37c7600088a5e080b2f35794b0923395daf036d0 /spec/ruby/library/socket/basicsocket
parentafcbb501ac17ba2ad5370ada5fd26e8dda9a5aaa (diff)
Update to ruby/spec@ccf0d85
Diffstat (limited to 'spec/ruby/library/socket/basicsocket')
-rw-r--r--spec/ruby/library/socket/basicsocket/local_address_spec.rb10
-rw-r--r--spec/ruby/library/socket/basicsocket/remote_address_spec.rb10
2 files changed, 20 insertions, 0 deletions
diff --git a/spec/ruby/library/socket/basicsocket/local_address_spec.rb b/spec/ruby/library/socket/basicsocket/local_address_spec.rb
new file mode 100644
index 0000000000..0bd60a44cd
--- /dev/null
+++ b/spec/ruby/library/socket/basicsocket/local_address_spec.rb
@@ -0,0 +1,10 @@
+require_relative '../spec_helper'
+require_relative '../shared/address'
+
+describe 'BasicSocket#local_address' do
+ it_behaves_like :socket_local_remote_address, :local_address, -> socket {
+ a2 = BasicSocket.for_fd(socket.fileno)
+ a2.autoclose = false
+ a2.local_address
+ }
+end
diff --git a/spec/ruby/library/socket/basicsocket/remote_address_spec.rb b/spec/ruby/library/socket/basicsocket/remote_address_spec.rb
new file mode 100644
index 0000000000..439bf31592
--- /dev/null
+++ b/spec/ruby/library/socket/basicsocket/remote_address_spec.rb
@@ -0,0 +1,10 @@
+require_relative '../spec_helper'
+require_relative '../shared/address'
+
+describe 'BasicSocket#remote_address' do
+ it_behaves_like :socket_local_remote_address, :remote_address, -> socket {
+ a2 = BasicSocket.for_fd(socket.fileno)
+ a2.autoclose = false
+ a2.remote_address
+ }
+end