summaryrefslogtreecommitdiff
path: root/spec/ruby/library/net
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/net')
-rw-r--r--spec/ruby/library/net/FTPError_spec.rb2
-rw-r--r--spec/ruby/library/net/FTPPermError_spec.rb2
-rw-r--r--spec/ruby/library/net/FTPProtoError_spec.rb2
-rw-r--r--spec/ruby/library/net/FTPReplyError_spec.rb2
-rw-r--r--spec/ruby/library/net/FTPTempError_spec.rb2
-rw-r--r--spec/ruby/library/net/ftp/abort_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/acct_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/binary_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/chdir_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/close_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/closed_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/connect_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/debug_mode_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/default_passive_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/delete_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/dir_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/get_spec.rb10
-rw-r--r--spec/ruby/library/net/ftp/getbinaryfile_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/getdir_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/gettextfile_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/help_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/initialize_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/last_response_code_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/last_response_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/lastresp_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/list_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/login_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/ls_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/mdtm_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/mkdir_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/mtime_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/nlst_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/noop_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/open_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/passive_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/put_spec.rb10
-rw-r--r--spec/ruby/library/net/ftp/putbinaryfile_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/puttextfile_spec.rb8
-rw-r--r--spec/ruby/library/net/ftp/pwd_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/quit_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/rename_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/resume_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/retrbinary_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/retrlines_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/return_code_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/rmdir_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/sendcmd_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/set_socket_spec.rb4
-rw-r--r--spec/ruby/library/net/ftp/site_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/size_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/status_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/storbinary_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/storlines_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/system_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/voidcmd_spec.rb6
-rw-r--r--spec/ruby/library/net/ftp/welcome_spec.rb6
-rw-r--r--spec/ruby/library/net/http/HTTPBadResponse_spec.rb2
-rw-r--r--spec/ruby/library/net/http/HTTPError_spec.rb2
-rw-r--r--spec/ruby/library/net/http/HTTPFatalError_spec.rb2
-rw-r--r--spec/ruby/library/net/http/HTTPHeaderSyntaxError_spec.rb2
-rw-r--r--spec/ruby/library/net/http/HTTPRetriableError_spec.rb2
-rw-r--r--spec/ruby/library/net/http/HTTPServerException_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/Proxy_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/active_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/address_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/close_on_empty_response_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/copy_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/default_port_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/delete_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/finish_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/get2_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/get_print_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/get_response_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/get_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/head2_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/head_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/http_default_port_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/https_default_port_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/initialize_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/inspect_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/is_version_1_1_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/is_version_1_2_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/lock_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/mkcol_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/move_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/new_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/newobj_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/open_timeout_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/options_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/port_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/post2_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/post_form_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/post_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/propfind_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/proppatch_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/proxy_address_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/proxy_class_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/proxy_pass_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/proxy_port_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/proxy_user_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/put2_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/put_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/read_timeout_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/request_get_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/request_head_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/request_post_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/request_put_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/request_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/request_types_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/send_request_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/set_debug_output_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/socket_type_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/start_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/started_spec.rb6
-rw-r--r--spec/ruby/library/net/http/http/trace_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/unlock_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/use_ssl_spec.rb2
-rw-r--r--spec/ruby/library/net/http/http/version_1_1_spec.rb4
-rw-r--r--spec/ruby/library/net/http/http/version_1_2_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpexceptions/initialize_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpexceptions/response_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/body_exist_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/body_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/body_stream_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/exec_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/inspect_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/method_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/path_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/request_body_permitted_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/response_body_permitted_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpgenericrequest/set_body_internal_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpheader/add_field_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/basic_auth_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/canonical_each_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/chunked_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/content_length_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/content_range_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/content_type_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/delete_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/each_capitalized_name_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/each_capitalized_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/each_header_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/each_key_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/each_name_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/each_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/each_value_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/element_reference_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/element_set_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/fetch_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/form_data_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/get_fields_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/initialize_http_header_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/key_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/length_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/main_type_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/proxy_basic_auth_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/range_length_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/range_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/set_content_type_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/set_form_data_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/set_range_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/size_spec.rb6
-rw-r--r--spec/ruby/library/net/http/httpheader/sub_type_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/to_hash_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpheader/type_params_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httprequest/initialize_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/body_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpresponse/code_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/code_type_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/entity_spec.rb4
-rw-r--r--spec/ruby/library/net/http/httpresponse/error_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/error_type_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/exception_type_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/header_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/http_version_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/initialize_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/inspect_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/message_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/msg_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/read_body_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/read_header_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/read_new_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/reading_body_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/response_spec.rb2
-rw-r--r--spec/ruby/library/net/http/httpresponse/value_spec.rb2
186 files changed, 389 insertions, 389 deletions
diff --git a/spec/ruby/library/net/FTPError_spec.rb b/spec/ruby/library/net/FTPError_spec.rb
index 7cc06f681a..0c31b65dcc 100644
--- a/spec/ruby/library/net/FTPError_spec.rb
+++ b/spec/ruby/library/net/FTPError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'net/ftp'
describe "Net::FTPError" do
diff --git a/spec/ruby/library/net/FTPPermError_spec.rb b/spec/ruby/library/net/FTPPermError_spec.rb
index d9a7189468..b43e12c503 100644
--- a/spec/ruby/library/net/FTPPermError_spec.rb
+++ b/spec/ruby/library/net/FTPPermError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'net/ftp'
describe "Net::FTPPermError" do
diff --git a/spec/ruby/library/net/FTPProtoError_spec.rb b/spec/ruby/library/net/FTPProtoError_spec.rb
index 445ba1cd2f..e7abbc0dd8 100644
--- a/spec/ruby/library/net/FTPProtoError_spec.rb
+++ b/spec/ruby/library/net/FTPProtoError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'net/ftp'
describe "Net::FTPProtoError" do
diff --git a/spec/ruby/library/net/FTPReplyError_spec.rb b/spec/ruby/library/net/FTPReplyError_spec.rb
index b697f0b95a..fcc7501fc1 100644
--- a/spec/ruby/library/net/FTPReplyError_spec.rb
+++ b/spec/ruby/library/net/FTPReplyError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'net/ftp'
describe "Net::FTPReplyError" do
diff --git a/spec/ruby/library/net/FTPTempError_spec.rb b/spec/ruby/library/net/FTPTempError_spec.rb
index 8d74d371da..f4b045dfb5 100644
--- a/spec/ruby/library/net/FTPTempError_spec.rb
+++ b/spec/ruby/library/net/FTPTempError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
require 'net/ftp'
describe "Net::FTPTempError" do
diff --git a/spec/ruby/library/net/ftp/abort_spec.rb b/spec/ruby/library/net/ftp/abort_spec.rb
index ea47eaf9bf..ff2144a3a0 100644
--- a/spec/ruby/library/net/ftp/abort_spec.rb
+++ b/spec/ruby/library/net/ftp/abort_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#abort" do
before :each do
diff --git a/spec/ruby/library/net/ftp/acct_spec.rb b/spec/ruby/library/net/ftp/acct_spec.rb
index e60c6b3088..3db51fca0f 100644
--- a/spec/ruby/library/net/ftp/acct_spec.rb
+++ b/spec/ruby/library/net/ftp/acct_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#acct" do
before :each do
diff --git a/spec/ruby/library/net/ftp/binary_spec.rb b/spec/ruby/library/net/ftp/binary_spec.rb
index 6f1a1ab8ba..60e312a673 100644
--- a/spec/ruby/library/net/ftp/binary_spec.rb
+++ b/spec/ruby/library/net/ftp/binary_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#binary" do
it "returns true when self is in binary mode" do
diff --git a/spec/ruby/library/net/ftp/chdir_spec.rb b/spec/ruby/library/net/ftp/chdir_spec.rb
index f6cfac5b66..1f558c47e8 100644
--- a/spec/ruby/library/net/ftp/chdir_spec.rb
+++ b/spec/ruby/library/net/ftp/chdir_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#chdir" do
before :each do
diff --git a/spec/ruby/library/net/ftp/close_spec.rb b/spec/ruby/library/net/ftp/close_spec.rb
index 0f6866221f..95c72b29ed 100644
--- a/spec/ruby/library/net/ftp/close_spec.rb
+++ b/spec/ruby/library/net/ftp/close_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#close" do
before :each do
diff --git a/spec/ruby/library/net/ftp/closed_spec.rb b/spec/ruby/library/net/ftp/closed_spec.rb
index 7b31717c00..1f3e69b0c1 100644
--- a/spec/ruby/library/net/ftp/closed_spec.rb
+++ b/spec/ruby/library/net/ftp/closed_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#closed?" do
before :each do
diff --git a/spec/ruby/library/net/ftp/connect_spec.rb b/spec/ruby/library/net/ftp/connect_spec.rb
index f3c1565fc2..981751233e 100644
--- a/spec/ruby/library/net/ftp/connect_spec.rb
+++ b/spec/ruby/library/net/ftp/connect_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
# TODO: Add specs for using the SOCKSSocket
describe "Net::FTP#connect" do
diff --git a/spec/ruby/library/net/ftp/debug_mode_spec.rb b/spec/ruby/library/net/ftp/debug_mode_spec.rb
index c4aa5eee3c..f49da55ed1 100644
--- a/spec/ruby/library/net/ftp/debug_mode_spec.rb
+++ b/spec/ruby/library/net/ftp/debug_mode_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#debug_mode" do
it "returns true when self is in debug mode" do
diff --git a/spec/ruby/library/net/ftp/default_passive_spec.rb b/spec/ruby/library/net/ftp/default_passive_spec.rb
index f526373b82..af8925fc1e 100644
--- a/spec/ruby/library/net/ftp/default_passive_spec.rb
+++ b/spec/ruby/library/net/ftp/default_passive_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
ruby_version_is "2.3" do
describe "Net::FTP#default_passive" do
diff --git a/spec/ruby/library/net/ftp/delete_spec.rb b/spec/ruby/library/net/ftp/delete_spec.rb
index b20ef32651..fa0eddb312 100644
--- a/spec/ruby/library/net/ftp/delete_spec.rb
+++ b/spec/ruby/library/net/ftp/delete_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#delete" do
before :each do
diff --git a/spec/ruby/library/net/ftp/dir_spec.rb b/spec/ruby/library/net/ftp/dir_spec.rb
index 6a2b766ca2..47ac7b8d9b 100644
--- a/spec/ruby/library/net/ftp/dir_spec.rb
+++ b/spec/ruby/library/net/ftp/dir_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/list', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/list'
describe "Net::FTP#dir" do
it_behaves_like :net_ftp_list, :dir
diff --git a/spec/ruby/library/net/ftp/get_spec.rb b/spec/ruby/library/net/ftp/get_spec.rb
index 59fc45d010..c4672b55a5 100644
--- a/spec/ruby/library/net/ftp/get_spec.rb
+++ b/spec/ruby/library/net/ftp/get_spec.rb
@@ -1,8 +1,8 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/gettextfile', __FILE__)
-require File.expand_path('../shared/getbinaryfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/gettextfile'
+require_relative 'shared/getbinaryfile'
describe "Net::FTP#get (binary mode)" do
before :each do
diff --git a/spec/ruby/library/net/ftp/getbinaryfile_spec.rb b/spec/ruby/library/net/ftp/getbinaryfile_spec.rb
index 0f921c8b1d..155851b53c 100644
--- a/spec/ruby/library/net/ftp/getbinaryfile_spec.rb
+++ b/spec/ruby/library/net/ftp/getbinaryfile_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/getbinaryfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/getbinaryfile'
describe "Net::FTP#getbinaryfile" do
it_behaves_like :net_ftp_getbinaryfile, :getbinaryfile
diff --git a/spec/ruby/library/net/ftp/getdir_spec.rb b/spec/ruby/library/net/ftp/getdir_spec.rb
index 19ace4dff9..eea35ac130 100644
--- a/spec/ruby/library/net/ftp/getdir_spec.rb
+++ b/spec/ruby/library/net/ftp/getdir_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../shared/pwd', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'shared/pwd'
describe "Net::FTP#getdir" do
it_behaves_like :net_ftp_pwd, :getdir
diff --git a/spec/ruby/library/net/ftp/gettextfile_spec.rb b/spec/ruby/library/net/ftp/gettextfile_spec.rb
index 29077df253..79395ae009 100644
--- a/spec/ruby/library/net/ftp/gettextfile_spec.rb
+++ b/spec/ruby/library/net/ftp/gettextfile_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/gettextfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/gettextfile'
describe "Net::FTP#gettextfile" do
it_behaves_like :net_ftp_gettextfile, :gettextfile
diff --git a/spec/ruby/library/net/ftp/help_spec.rb b/spec/ruby/library/net/ftp/help_spec.rb
index 6f5f901024..c7a089a588 100644
--- a/spec/ruby/library/net/ftp/help_spec.rb
+++ b/spec/ruby/library/net/ftp/help_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#help" do
def with_connection
diff --git a/spec/ruby/library/net/ftp/initialize_spec.rb b/spec/ruby/library/net/ftp/initialize_spec.rb
index b33d345f32..cd6252ac31 100644
--- a/spec/ruby/library/net/ftp/initialize_spec.rb
+++ b/spec/ruby/library/net/ftp/initialize_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#initialize" do
before :each do
diff --git a/spec/ruby/library/net/ftp/last_response_code_spec.rb b/spec/ruby/library/net/ftp/last_response_code_spec.rb
index 77651a9be4..3eb20f7ad8 100644
--- a/spec/ruby/library/net/ftp/last_response_code_spec.rb
+++ b/spec/ruby/library/net/ftp/last_response_code_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../shared/last_response_code', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'shared/last_response_code'
+require_relative 'fixtures/server'
describe "Net::FTP#last_response_code" do
it_behaves_like :net_ftp_last_response_code, :last_response_code
diff --git a/spec/ruby/library/net/ftp/last_response_spec.rb b/spec/ruby/library/net/ftp/last_response_spec.rb
index eb53f92774..ada665d59c 100644
--- a/spec/ruby/library/net/ftp/last_response_spec.rb
+++ b/spec/ruby/library/net/ftp/last_response_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#last_response" do
before :each do
diff --git a/spec/ruby/library/net/ftp/lastresp_spec.rb b/spec/ruby/library/net/ftp/lastresp_spec.rb
index d2c6f44e48..273e216e8b 100644
--- a/spec/ruby/library/net/ftp/lastresp_spec.rb
+++ b/spec/ruby/library/net/ftp/lastresp_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../shared/last_response_code', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'shared/last_response_code'
+require_relative 'fixtures/server'
describe "Net::FTP#lastresp" do
it_behaves_like :net_ftp_last_response_code, :lastresp
diff --git a/spec/ruby/library/net/ftp/list_spec.rb b/spec/ruby/library/net/ftp/list_spec.rb
index 41c55c42ac..6175172923 100644
--- a/spec/ruby/library/net/ftp/list_spec.rb
+++ b/spec/ruby/library/net/ftp/list_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/list', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/list'
describe "Net::FTP#list" do
it_behaves_like :net_ftp_list, :list
diff --git a/spec/ruby/library/net/ftp/login_spec.rb b/spec/ruby/library/net/ftp/login_spec.rb
index 9768d9cf33..c4f14f8747 100644
--- a/spec/ruby/library/net/ftp/login_spec.rb
+++ b/spec/ruby/library/net/ftp/login_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#login" do
before :each do
diff --git a/spec/ruby/library/net/ftp/ls_spec.rb b/spec/ruby/library/net/ftp/ls_spec.rb
index f713fb46aa..e729eb9481 100644
--- a/spec/ruby/library/net/ftp/ls_spec.rb
+++ b/spec/ruby/library/net/ftp/ls_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/list', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/list'
describe "Net::FTP#ls" do
it_behaves_like :net_ftp_list, :ls
diff --git a/spec/ruby/library/net/ftp/mdtm_spec.rb b/spec/ruby/library/net/ftp/mdtm_spec.rb
index bbd28d10b1..ddcc06d708 100644
--- a/spec/ruby/library/net/ftp/mdtm_spec.rb
+++ b/spec/ruby/library/net/ftp/mdtm_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#mdtm" do
before :each do
diff --git a/spec/ruby/library/net/ftp/mkdir_spec.rb b/spec/ruby/library/net/ftp/mkdir_spec.rb
index 2a7088e5d9..0d8314bfa3 100644
--- a/spec/ruby/library/net/ftp/mkdir_spec.rb
+++ b/spec/ruby/library/net/ftp/mkdir_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#mkdir" do
before :each do
diff --git a/spec/ruby/library/net/ftp/mtime_spec.rb b/spec/ruby/library/net/ftp/mtime_spec.rb
index 0e76aa079b..e05e92f58f 100644
--- a/spec/ruby/library/net/ftp/mtime_spec.rb
+++ b/spec/ruby/library/net/ftp/mtime_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#mtime" do
before :each do
diff --git a/spec/ruby/library/net/ftp/nlst_spec.rb b/spec/ruby/library/net/ftp/nlst_spec.rb
index 4723e9f6c6..36ca7a6127 100644
--- a/spec/ruby/library/net/ftp/nlst_spec.rb
+++ b/spec/ruby/library/net/ftp/nlst_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#nlst" do
before :each do
diff --git a/spec/ruby/library/net/ftp/noop_spec.rb b/spec/ruby/library/net/ftp/noop_spec.rb
index 1bc6ccd913..eca8911b7b 100644
--- a/spec/ruby/library/net/ftp/noop_spec.rb
+++ b/spec/ruby/library/net/ftp/noop_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#noop" do
before :each do
diff --git a/spec/ruby/library/net/ftp/open_spec.rb b/spec/ruby/library/net/ftp/open_spec.rb
index b422e64c87..7be02ff373 100644
--- a/spec/ruby/library/net/ftp/open_spec.rb
+++ b/spec/ruby/library/net/ftp/open_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP.open" do
before :each do
diff --git a/spec/ruby/library/net/ftp/passive_spec.rb b/spec/ruby/library/net/ftp/passive_spec.rb
index fd9a0dffe3..041b9552d5 100644
--- a/spec/ruby/library/net/ftp/passive_spec.rb
+++ b/spec/ruby/library/net/ftp/passive_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#passive" do
it "returns true when self is in passive mode" do
diff --git a/spec/ruby/library/net/ftp/put_spec.rb b/spec/ruby/library/net/ftp/put_spec.rb
index 61a8d00543..f1f85b5d05 100644
--- a/spec/ruby/library/net/ftp/put_spec.rb
+++ b/spec/ruby/library/net/ftp/put_spec.rb
@@ -1,8 +1,8 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/puttextfile', __FILE__)
-require File.expand_path('../shared/putbinaryfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/puttextfile'
+require_relative 'shared/putbinaryfile'
describe "Net::FTP#put (binary mode)" do
before :each do
diff --git a/spec/ruby/library/net/ftp/putbinaryfile_spec.rb b/spec/ruby/library/net/ftp/putbinaryfile_spec.rb
index 18955409b6..cb1c7bef5a 100644
--- a/spec/ruby/library/net/ftp/putbinaryfile_spec.rb
+++ b/spec/ruby/library/net/ftp/putbinaryfile_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/putbinaryfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/putbinaryfile'
describe "Net::FTP#putbinaryfile" do
it_behaves_like :net_ftp_putbinaryfile, :putbinaryfile
diff --git a/spec/ruby/library/net/ftp/puttextfile_spec.rb b/spec/ruby/library/net/ftp/puttextfile_spec.rb
index 2ca6e98c92..00a930afd7 100644
--- a/spec/ruby/library/net/ftp/puttextfile_spec.rb
+++ b/spec/ruby/library/net/ftp/puttextfile_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
-require File.expand_path('../shared/puttextfile', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
+require_relative 'shared/puttextfile'
describe "Net::FTP#puttextfile" do
it_behaves_like :net_ftp_puttextfile, :puttextfile
diff --git a/spec/ruby/library/net/ftp/pwd_spec.rb b/spec/ruby/library/net/ftp/pwd_spec.rb
index d5438d8e56..f515cd29a0 100644
--- a/spec/ruby/library/net/ftp/pwd_spec.rb
+++ b/spec/ruby/library/net/ftp/pwd_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#pwd" do
before :each do
diff --git a/spec/ruby/library/net/ftp/quit_spec.rb b/spec/ruby/library/net/ftp/quit_spec.rb
index c053641939..fdc3a2f795 100644
--- a/spec/ruby/library/net/ftp/quit_spec.rb
+++ b/spec/ruby/library/net/ftp/quit_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#quit" do
before :each do
diff --git a/spec/ruby/library/net/ftp/rename_spec.rb b/spec/ruby/library/net/ftp/rename_spec.rb
index 0216d2059a..e1fd4e47cf 100644
--- a/spec/ruby/library/net/ftp/rename_spec.rb
+++ b/spec/ruby/library/net/ftp/rename_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#rename" do
before :each do
diff --git a/spec/ruby/library/net/ftp/resume_spec.rb b/spec/ruby/library/net/ftp/resume_spec.rb
index 9ec4a921aa..51b1cff2a4 100644
--- a/spec/ruby/library/net/ftp/resume_spec.rb
+++ b/spec/ruby/library/net/ftp/resume_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#resume" do
it "returns true when self is set to resume uploads/downloads" do
diff --git a/spec/ruby/library/net/ftp/retrbinary_spec.rb b/spec/ruby/library/net/ftp/retrbinary_spec.rb
index fd7af0b62a..30e2484af5 100644
--- a/spec/ruby/library/net/ftp/retrbinary_spec.rb
+++ b/spec/ruby/library/net/ftp/retrbinary_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#retrbinary" do
before :each do
diff --git a/spec/ruby/library/net/ftp/retrlines_spec.rb b/spec/ruby/library/net/ftp/retrlines_spec.rb
index cb8d48ecf7..546df3844e 100644
--- a/spec/ruby/library/net/ftp/retrlines_spec.rb
+++ b/spec/ruby/library/net/ftp/retrlines_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#retrlines" do
before :each do
diff --git a/spec/ruby/library/net/ftp/return_code_spec.rb b/spec/ruby/library/net/ftp/return_code_spec.rb
index 64100bc3fc..605f66ec6e 100644
--- a/spec/ruby/library/net/ftp/return_code_spec.rb
+++ b/spec/ruby/library/net/ftp/return_code_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#return_code" do
before :each do
diff --git a/spec/ruby/library/net/ftp/rmdir_spec.rb b/spec/ruby/library/net/ftp/rmdir_spec.rb
index 453c7823c4..ab92a8678b 100644
--- a/spec/ruby/library/net/ftp/rmdir_spec.rb
+++ b/spec/ruby/library/net/ftp/rmdir_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#rmdir" do
before :each do
diff --git a/spec/ruby/library/net/ftp/sendcmd_spec.rb b/spec/ruby/library/net/ftp/sendcmd_spec.rb
index 9bdca621bc..631bc10c84 100644
--- a/spec/ruby/library/net/ftp/sendcmd_spec.rb
+++ b/spec/ruby/library/net/ftp/sendcmd_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#sendcmd" do
before :each do
diff --git a/spec/ruby/library/net/ftp/set_socket_spec.rb b/spec/ruby/library/net/ftp/set_socket_spec.rb
index 1553445219..3aa5686326 100644
--- a/spec/ruby/library/net/ftp/set_socket_spec.rb
+++ b/spec/ruby/library/net/ftp/set_socket_spec.rb
@@ -1,5 +1,5 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
describe "Net::FTP#set_socket" do
# TODO: I won't spec this method, as it is not used
diff --git a/spec/ruby/library/net/ftp/site_spec.rb b/spec/ruby/library/net/ftp/site_spec.rb
index d02b94e899..85aa2609c1 100644
--- a/spec/ruby/library/net/ftp/site_spec.rb
+++ b/spec/ruby/library/net/ftp/site_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#site" do
before :each do
diff --git a/spec/ruby/library/net/ftp/size_spec.rb b/spec/ruby/library/net/ftp/size_spec.rb
index a3d5db50b4..eb3ee90d0f 100644
--- a/spec/ruby/library/net/ftp/size_spec.rb
+++ b/spec/ruby/library/net/ftp/size_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#size" do
before :each do
diff --git a/spec/ruby/library/net/ftp/status_spec.rb b/spec/ruby/library/net/ftp/status_spec.rb
index 243d3fc175..22d0d47254 100644
--- a/spec/ruby/library/net/ftp/status_spec.rb
+++ b/spec/ruby/library/net/ftp/status_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#status" do
before :each do
diff --git a/spec/ruby/library/net/ftp/storbinary_spec.rb b/spec/ruby/library/net/ftp/storbinary_spec.rb
index fc7561b5a9..eb65db1e8d 100644
--- a/spec/ruby/library/net/ftp/storbinary_spec.rb
+++ b/spec/ruby/library/net/ftp/storbinary_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#storbinary" do
before :each do
diff --git a/spec/ruby/library/net/ftp/storlines_spec.rb b/spec/ruby/library/net/ftp/storlines_spec.rb
index 9ea4b83603..4affa37eee 100644
--- a/spec/ruby/library/net/ftp/storlines_spec.rb
+++ b/spec/ruby/library/net/ftp/storlines_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#storlines" do
before :each do
diff --git a/spec/ruby/library/net/ftp/system_spec.rb b/spec/ruby/library/net/ftp/system_spec.rb
index 603dd09152..73a5ddc72f 100644
--- a/spec/ruby/library/net/ftp/system_spec.rb
+++ b/spec/ruby/library/net/ftp/system_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#system" do
before :each do
diff --git a/spec/ruby/library/net/ftp/voidcmd_spec.rb b/spec/ruby/library/net/ftp/voidcmd_spec.rb
index 8b3e0c17c9..5e82b70a78 100644
--- a/spec/ruby/library/net/ftp/voidcmd_spec.rb
+++ b/spec/ruby/library/net/ftp/voidcmd_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#voidcmd" do
before :each do
diff --git a/spec/ruby/library/net/ftp/welcome_spec.rb b/spec/ruby/library/net/ftp/welcome_spec.rb
index 5505623ce3..a0d7483949 100644
--- a/spec/ruby/library/net/ftp/welcome_spec.rb
+++ b/spec/ruby/library/net/ftp/welcome_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
-require File.expand_path('../spec_helper', __FILE__)
-require File.expand_path('../fixtures/server', __FILE__)
+require_relative '../../../spec_helper'
+require_relative 'spec_helper'
+require_relative 'fixtures/server'
describe "Net::FTP#welcome" do
before :each do
diff --git a/spec/ruby/library/net/http/HTTPBadResponse_spec.rb b/spec/ruby/library/net/http/HTTPBadResponse_spec.rb
index 78bb0c8420..be644968f5 100644
--- a/spec/ruby/library/net/http/HTTPBadResponse_spec.rb
+++ b/spec/ruby/library/net/http/HTTPBadResponse_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPBadResponse" do
diff --git a/spec/ruby/library/net/http/HTTPError_spec.rb b/spec/ruby/library/net/http/HTTPError_spec.rb
index 5fa87f140b..ab5f491bb7 100644
--- a/spec/ruby/library/net/http/HTTPError_spec.rb
+++ b/spec/ruby/library/net/http/HTTPError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPError" do
diff --git a/spec/ruby/library/net/http/HTTPFatalError_spec.rb b/spec/ruby/library/net/http/HTTPFatalError_spec.rb
index 72468faf8d..6ab36bff6c 100644
--- a/spec/ruby/library/net/http/HTTPFatalError_spec.rb
+++ b/spec/ruby/library/net/http/HTTPFatalError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPFatalError" do
diff --git a/spec/ruby/library/net/http/HTTPHeaderSyntaxError_spec.rb b/spec/ruby/library/net/http/HTTPHeaderSyntaxError_spec.rb
index 3e7ee24365..38e9454f99 100644
--- a/spec/ruby/library/net/http/HTTPHeaderSyntaxError_spec.rb
+++ b/spec/ruby/library/net/http/HTTPHeaderSyntaxError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPHeaderSyntaxError" do
diff --git a/spec/ruby/library/net/http/HTTPRetriableError_spec.rb b/spec/ruby/library/net/http/HTTPRetriableError_spec.rb
index 71f6bdb196..3a4bb9146c 100644
--- a/spec/ruby/library/net/http/HTTPRetriableError_spec.rb
+++ b/spec/ruby/library/net/http/HTTPRetriableError_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPRetriableError" do
diff --git a/spec/ruby/library/net/http/HTTPServerException_spec.rb b/spec/ruby/library/net/http/HTTPServerException_spec.rb
index 35566ab0c5..94da749ded 100644
--- a/spec/ruby/library/net/http/HTTPServerException_spec.rb
+++ b/spec/ruby/library/net/http/HTTPServerException_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'net/http'
describe "Net::HTTPServerException" do
diff --git a/spec/ruby/library/net/http/http/Proxy_spec.rb b/spec/ruby/library/net/http/http/Proxy_spec.rb
index 2de3fb2d75..f85ccc0ee9 100644
--- a/spec/ruby/library/net/http/http/Proxy_spec.rb
+++ b/spec/ruby/library/net/http/http/Proxy_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.Proxy" do
diff --git a/spec/ruby/library/net/http/http/active_spec.rb b/spec/ruby/library/net/http/http/active_spec.rb
index 28f1872fa9..ef657243ba 100644
--- a/spec/ruby/library/net/http/http/active_spec.rb
+++ b/spec/ruby/library/net/http/http/active_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/started', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/started'
describe "Net::HTTP#active?" do
it_behaves_like :net_http_started_p, :active?
diff --git a/spec/ruby/library/net/http/http/address_spec.rb b/spec/ruby/library/net/http/http/address_spec.rb
index a0fe28fb9e..5fce76d767 100644
--- a/spec/ruby/library/net/http/http/address_spec.rb
+++ b/spec/ruby/library/net/http/http/address_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#address" do
diff --git a/spec/ruby/library/net/http/http/close_on_empty_response_spec.rb b/spec/ruby/library/net/http/http/close_on_empty_response_spec.rb
index 52bede524e..a97b7b6c43 100644
--- a/spec/ruby/library/net/http/http/close_on_empty_response_spec.rb
+++ b/spec/ruby/library/net/http/http/close_on_empty_response_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#close_on_empty_response" do
diff --git a/spec/ruby/library/net/http/http/copy_spec.rb b/spec/ruby/library/net/http/http/copy_spec.rb
index c3c5e784b1..5ebfdc334e 100644
--- a/spec/ruby/library/net/http/http/copy_spec.rb
+++ b/spec/ruby/library/net/http/http/copy_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#copy" do
before :each do
diff --git a/spec/ruby/library/net/http/http/default_port_spec.rb b/spec/ruby/library/net/http/http/default_port_spec.rb
index 8d9b3ac64a..30db18efae 100644
--- a/spec/ruby/library/net/http/http/default_port_spec.rb
+++ b/spec/ruby/library/net/http/http/default_port_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.default_port" do
diff --git a/spec/ruby/library/net/http/http/delete_spec.rb b/spec/ruby/library/net/http/http/delete_spec.rb
index 856d3b3af3..160c653115 100644
--- a/spec/ruby/library/net/http/http/delete_spec.rb
+++ b/spec/ruby/library/net/http/http/delete_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#delete" do
before :each do
diff --git a/spec/ruby/library/net/http/http/finish_spec.rb b/spec/ruby/library/net/http/http/finish_spec.rb
index ccc6878961..b031c58e2c 100644
--- a/spec/ruby/library/net/http/http/finish_spec.rb
+++ b/spec/ruby/library/net/http/http/finish_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#finish" do
before :each do
diff --git a/spec/ruby/library/net/http/http/get2_spec.rb b/spec/ruby/library/net/http/http/get2_spec.rb
index 2173156adf..71dfc3d39b 100644
--- a/spec/ruby/library/net/http/http/get2_spec.rb
+++ b/spec/ruby/library/net/http/http/get2_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_get', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_get'
describe "Net::HTTP#get2" do
it_behaves_like :net_ftp_request_get, :get2
diff --git a/spec/ruby/library/net/http/http/get_print_spec.rb b/spec/ruby/library/net/http/http/get_print_spec.rb
index d91a584aaa..6174e3eb21 100644
--- a/spec/ruby/library/net/http/http/get_print_spec.rb
+++ b/spec/ruby/library/net/http/http/get_print_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP.get_print" do
before :each do
diff --git a/spec/ruby/library/net/http/http/get_response_spec.rb b/spec/ruby/library/net/http/http/get_response_spec.rb
index fdc1ae1f66..941b35e773 100644
--- a/spec/ruby/library/net/http/http/get_response_spec.rb
+++ b/spec/ruby/library/net/http/http/get_response_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP.get_response" do
before :each do
diff --git a/spec/ruby/library/net/http/http/get_spec.rb b/spec/ruby/library/net/http/http/get_spec.rb
index d434191d2d..4b8af5950a 100644
--- a/spec/ruby/library/net/http/http/get_spec.rb
+++ b/spec/ruby/library/net/http/http/get_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP.get when passed URI" do
before :each do
diff --git a/spec/ruby/library/net/http/http/head2_spec.rb b/spec/ruby/library/net/http/http/head2_spec.rb
index 66d533c84d..c8bd987eef 100644
--- a/spec/ruby/library/net/http/http/head2_spec.rb
+++ b/spec/ruby/library/net/http/http/head2_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_head', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_head'
describe "Net::HTTP#head2" do
it_behaves_like :net_ftp_request_head, :head2
diff --git a/spec/ruby/library/net/http/http/head_spec.rb b/spec/ruby/library/net/http/http/head_spec.rb
index d0d13a6451..925a8e6043 100644
--- a/spec/ruby/library/net/http/http/head_spec.rb
+++ b/spec/ruby/library/net/http/http/head_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#head" do
before :each do
diff --git a/spec/ruby/library/net/http/http/http_default_port_spec.rb b/spec/ruby/library/net/http/http/http_default_port_spec.rb
index 6b840bbf30..cf7f73e630 100644
--- a/spec/ruby/library/net/http/http/http_default_port_spec.rb
+++ b/spec/ruby/library/net/http/http/http_default_port_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.http_default_port" do
diff --git a/spec/ruby/library/net/http/http/https_default_port_spec.rb b/spec/ruby/library/net/http/http/https_default_port_spec.rb
index bd213f2325..fbf0bd1abc 100644
--- a/spec/ruby/library/net/http/http/https_default_port_spec.rb
+++ b/spec/ruby/library/net/http/http/https_default_port_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.https_default_port" do
diff --git a/spec/ruby/library/net/http/http/initialize_spec.rb b/spec/ruby/library/net/http/http/initialize_spec.rb
index 0cd59f493d..7683713a0e 100644
--- a/spec/ruby/library/net/http/http/initialize_spec.rb
+++ b/spec/ruby/library/net/http/http/initialize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#initialize" do
diff --git a/spec/ruby/library/net/http/http/inspect_spec.rb b/spec/ruby/library/net/http/http/inspect_spec.rb
index 7c5d9bf0eb..b1e799ca34 100644
--- a/spec/ruby/library/net/http/http/inspect_spec.rb
+++ b/spec/ruby/library/net/http/http/inspect_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#inspect" do
before :each do
diff --git a/spec/ruby/library/net/http/http/is_version_1_1_spec.rb b/spec/ruby/library/net/http/http/is_version_1_1_spec.rb
index 8fa5da6be7..f37695b777 100644
--- a/spec/ruby/library/net/http/http/is_version_1_1_spec.rb
+++ b/spec/ruby/library/net/http/http/is_version_1_1_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/version_1_1', __FILE__)
+require_relative 'shared/version_1_1'
describe "Net::HTTP.is_version_1_1?" do
it_behaves_like :net_http_version_1_1_p, :is_version_1_1?
diff --git a/spec/ruby/library/net/http/http/is_version_1_2_spec.rb b/spec/ruby/library/net/http/http/is_version_1_2_spec.rb
index 344ac7f7c0..82dbdc87aa 100644
--- a/spec/ruby/library/net/http/http/is_version_1_2_spec.rb
+++ b/spec/ruby/library/net/http/http/is_version_1_2_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/version_1_2', __FILE__)
+require_relative 'shared/version_1_2'
describe "Net::HTTP.is_version_1_2?" do
it_behaves_like :net_http_version_1_2_p, :is_version_1_2?
diff --git a/spec/ruby/library/net/http/http/lock_spec.rb b/spec/ruby/library/net/http/http/lock_spec.rb
index e44099f9e5..bb76607a8b 100644
--- a/spec/ruby/library/net/http/http/lock_spec.rb
+++ b/spec/ruby/library/net/http/http/lock_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#lock" do
before :each do
diff --git a/spec/ruby/library/net/http/http/mkcol_spec.rb b/spec/ruby/library/net/http/http/mkcol_spec.rb
index 51b0a5b9c0..33017625e2 100644
--- a/spec/ruby/library/net/http/http/mkcol_spec.rb
+++ b/spec/ruby/library/net/http/http/mkcol_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#mkcol" do
before :each do
diff --git a/spec/ruby/library/net/http/http/move_spec.rb b/spec/ruby/library/net/http/http/move_spec.rb
index 0aa00195f8..4d6b828150 100644
--- a/spec/ruby/library/net/http/http/move_spec.rb
+++ b/spec/ruby/library/net/http/http/move_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#head" do
before :each do
diff --git a/spec/ruby/library/net/http/http/new_spec.rb b/spec/ruby/library/net/http/http/new_spec.rb
index b741eb0a4c..491d1d01fd 100644
--- a/spec/ruby/library/net/http/http/new_spec.rb
+++ b/spec/ruby/library/net/http/http/new_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.new" do
diff --git a/spec/ruby/library/net/http/http/newobj_spec.rb b/spec/ruby/library/net/http/http/newobj_spec.rb
index 88d5881725..b261dcc5db 100644
--- a/spec/ruby/library/net/http/http/newobj_spec.rb
+++ b/spec/ruby/library/net/http/http/newobj_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.newobj" do
diff --git a/spec/ruby/library/net/http/http/open_timeout_spec.rb b/spec/ruby/library/net/http/http/open_timeout_spec.rb
index 0142ae6c06..333ad5c5b5 100644
--- a/spec/ruby/library/net/http/http/open_timeout_spec.rb
+++ b/spec/ruby/library/net/http/http/open_timeout_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#open_timeout" do
diff --git a/spec/ruby/library/net/http/http/options_spec.rb b/spec/ruby/library/net/http/http/options_spec.rb
index 9c5e810105..d798e69197 100644
--- a/spec/ruby/library/net/http/http/options_spec.rb
+++ b/spec/ruby/library/net/http/http/options_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#options" do
before :each do
diff --git a/spec/ruby/library/net/http/http/port_spec.rb b/spec/ruby/library/net/http/http/port_spec.rb
index a916f722bf..7de295ca75 100644
--- a/spec/ruby/library/net/http/http/port_spec.rb
+++ b/spec/ruby/library/net/http/http/port_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#port" do
diff --git a/spec/ruby/library/net/http/http/post2_spec.rb b/spec/ruby/library/net/http/http/post2_spec.rb
index 298b2277bc..eab9a6a1d2 100644
--- a/spec/ruby/library/net/http/http/post2_spec.rb
+++ b/spec/ruby/library/net/http/http/post2_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_post', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_post'
describe "Net::HTTP#post2" do
it_behaves_like :net_ftp_request_post, :post2
diff --git a/spec/ruby/library/net/http/http/post_form_spec.rb b/spec/ruby/library/net/http/http/post_form_spec.rb
index 4a5d7ec731..891e05e7af 100644
--- a/spec/ruby/library/net/http/http/post_form_spec.rb
+++ b/spec/ruby/library/net/http/http/post_form_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP.post_form when passed URI" do
before :each do
diff --git a/spec/ruby/library/net/http/http/post_spec.rb b/spec/ruby/library/net/http/http/post_spec.rb
index 66a00f0670..d6c9154a35 100644
--- a/spec/ruby/library/net/http/http/post_spec.rb
+++ b/spec/ruby/library/net/http/http/post_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require 'uri'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
ruby_version_is '2.4' do
describe "Net::HTTP.post" do
diff --git a/spec/ruby/library/net/http/http/propfind_spec.rb b/spec/ruby/library/net/http/http/propfind_spec.rb
index c242eeec68..5240171618 100644
--- a/spec/ruby/library/net/http/http/propfind_spec.rb
+++ b/spec/ruby/library/net/http/http/propfind_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#propfind" do
before :each do
diff --git a/spec/ruby/library/net/http/http/proppatch_spec.rb b/spec/ruby/library/net/http/http/proppatch_spec.rb
index 8567f60719..7a761a9f23 100644
--- a/spec/ruby/library/net/http/http/proppatch_spec.rb
+++ b/spec/ruby/library/net/http/http/proppatch_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#proppatch" do
before :each do
diff --git a/spec/ruby/library/net/http/http/proxy_address_spec.rb b/spec/ruby/library/net/http/http/proxy_address_spec.rb
index 85f8dfedb4..8d152b8d44 100644
--- a/spec/ruby/library/net/http/http/proxy_address_spec.rb
+++ b/spec/ruby/library/net/http/http/proxy_address_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.proxy_address" do
diff --git a/spec/ruby/library/net/http/http/proxy_class_spec.rb b/spec/ruby/library/net/http/http/proxy_class_spec.rb
index 30d38a93e7..2aab804ed3 100644
--- a/spec/ruby/library/net/http/http/proxy_class_spec.rb
+++ b/spec/ruby/library/net/http/http/proxy_class_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.proxy_class?" do
diff --git a/spec/ruby/library/net/http/http/proxy_pass_spec.rb b/spec/ruby/library/net/http/http/proxy_pass_spec.rb
index 09db6f2877..94a0034544 100644
--- a/spec/ruby/library/net/http/http/proxy_pass_spec.rb
+++ b/spec/ruby/library/net/http/http/proxy_pass_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.proxy_pass" do
diff --git a/spec/ruby/library/net/http/http/proxy_port_spec.rb b/spec/ruby/library/net/http/http/proxy_port_spec.rb
index 0655232c6b..339f7ee850 100644
--- a/spec/ruby/library/net/http/http/proxy_port_spec.rb
+++ b/spec/ruby/library/net/http/http/proxy_port_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.proxy_port" do
diff --git a/spec/ruby/library/net/http/http/proxy_user_spec.rb b/spec/ruby/library/net/http/http/proxy_user_spec.rb
index 1beacca642..01fda400e9 100644
--- a/spec/ruby/library/net/http/http/proxy_user_spec.rb
+++ b/spec/ruby/library/net/http/http/proxy_user_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.proxy_user" do
diff --git a/spec/ruby/library/net/http/http/put2_spec.rb b/spec/ruby/library/net/http/http/put2_spec.rb
index a0e832d170..0ee3590639 100644
--- a/spec/ruby/library/net/http/http/put2_spec.rb
+++ b/spec/ruby/library/net/http/http/put2_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_put', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_put'
describe "Net::HTTP#put2" do
it_behaves_like :net_ftp_request_put, :put2
diff --git a/spec/ruby/library/net/http/http/put_spec.rb b/spec/ruby/library/net/http/http/put_spec.rb
index ab7e794db0..3ca0d0963e 100644
--- a/spec/ruby/library/net/http/http/put_spec.rb
+++ b/spec/ruby/library/net/http/http/put_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#put" do
before :each do
diff --git a/spec/ruby/library/net/http/http/read_timeout_spec.rb b/spec/ruby/library/net/http/http/read_timeout_spec.rb
index 86f2e0246d..e23ee76025 100644
--- a/spec/ruby/library/net/http/http/read_timeout_spec.rb
+++ b/spec/ruby/library/net/http/http/read_timeout_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#read_timeout" do
diff --git a/spec/ruby/library/net/http/http/request_get_spec.rb b/spec/ruby/library/net/http/http/request_get_spec.rb
index 33b040c622..f53a2e9d65 100644
--- a/spec/ruby/library/net/http/http/request_get_spec.rb
+++ b/spec/ruby/library/net/http/http/request_get_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_get', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_get'
describe "Net::HTTP#request_get" do
it_behaves_like :net_ftp_request_get, :get2
diff --git a/spec/ruby/library/net/http/http/request_head_spec.rb b/spec/ruby/library/net/http/http/request_head_spec.rb
index 85ff56dcb5..dc47557b9d 100644
--- a/spec/ruby/library/net/http/http/request_head_spec.rb
+++ b/spec/ruby/library/net/http/http/request_head_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_head', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_head'
describe "Net::HTTP#request_head" do
it_behaves_like :net_ftp_request_head, :request_head
diff --git a/spec/ruby/library/net/http/http/request_post_spec.rb b/spec/ruby/library/net/http/http/request_post_spec.rb
index 937b4d5d59..0b408fa84d 100644
--- a/spec/ruby/library/net/http/http/request_post_spec.rb
+++ b/spec/ruby/library/net/http/http/request_post_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_post', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_post'
describe "Net::HTTP#request_post" do
it_behaves_like :net_ftp_request_post, :request_post
diff --git a/spec/ruby/library/net/http/http/request_put_spec.rb b/spec/ruby/library/net/http/http/request_put_spec.rb
index c3a4b6d538..987b52ceb0 100644
--- a/spec/ruby/library/net/http/http/request_put_spec.rb
+++ b/spec/ruby/library/net/http/http/request_put_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/request_put', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/request_put'
describe "Net::HTTP#request_put" do
it_behaves_like :net_ftp_request_put, :request_put
diff --git a/spec/ruby/library/net/http/http/request_spec.rb b/spec/ruby/library/net/http/http/request_spec.rb
index d1c754df8c..e63dde9c8d 100644
--- a/spec/ruby/library/net/http/http/request_spec.rb
+++ b/spec/ruby/library/net/http/http/request_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#request" do
before :each do
diff --git a/spec/ruby/library/net/http/http/request_types_spec.rb b/spec/ruby/library/net/http/http/request_types_spec.rb
index 71fe863bb2..99d754d3d1 100644
--- a/spec/ruby/library/net/http/http/request_types_spec.rb
+++ b/spec/ruby/library/net/http/http/request_types_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP::Get" do
diff --git a/spec/ruby/library/net/http/http/send_request_spec.rb b/spec/ruby/library/net/http/http/send_request_spec.rb
index 5a704496ec..03fd32e470 100644
--- a/spec/ruby/library/net/http/http/send_request_spec.rb
+++ b/spec/ruby/library/net/http/http/send_request_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#send_request" do
before :each do
diff --git a/spec/ruby/library/net/http/http/set_debug_output_spec.rb b/spec/ruby/library/net/http/http/set_debug_output_spec.rb
index 820c368cd0..e0fe4796da 100644
--- a/spec/ruby/library/net/http/http/set_debug_output_spec.rb
+++ b/spec/ruby/library/net/http/http/set_debug_output_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#set_debug_output when passed io" do
before :each do
diff --git a/spec/ruby/library/net/http/http/socket_type_spec.rb b/spec/ruby/library/net/http/http/socket_type_spec.rb
index 4ec9b68571..5c844ddf94 100644
--- a/spec/ruby/library/net/http/http/socket_type_spec.rb
+++ b/spec/ruby/library/net/http/http/socket_type_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP.socket_type" do
diff --git a/spec/ruby/library/net/http/http/start_spec.rb b/spec/ruby/library/net/http/http/start_spec.rb
index 407d57e494..e23f9183f7 100644
--- a/spec/ruby/library/net/http/http/start_spec.rb
+++ b/spec/ruby/library/net/http/http/start_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP.start" do
before :each do
diff --git a/spec/ruby/library/net/http/http/started_spec.rb b/spec/ruby/library/net/http/http/started_spec.rb
index 01c17c93c1..ea441ed16a 100644
--- a/spec/ruby/library/net/http/http/started_spec.rb
+++ b/spec/ruby/library/net/http/http/started_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
-require File.expand_path('../shared/started', __FILE__)
+require_relative 'fixtures/http_server'
+require_relative 'shared/started'
describe "Net::HTTP#started?" do
it_behaves_like :net_http_started_p, :started?
diff --git a/spec/ruby/library/net/http/http/trace_spec.rb b/spec/ruby/library/net/http/http/trace_spec.rb
index 6cce15fc09..94a1bf6655 100644
--- a/spec/ruby/library/net/http/http/trace_spec.rb
+++ b/spec/ruby/library/net/http/http/trace_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#trace" do
before :each do
diff --git a/spec/ruby/library/net/http/http/unlock_spec.rb b/spec/ruby/library/net/http/http/unlock_spec.rb
index 12df417e1a..a4f1b7a1d1 100644
--- a/spec/ruby/library/net/http/http/unlock_spec.rb
+++ b/spec/ruby/library/net/http/http/unlock_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/http_server', __FILE__)
+require_relative 'fixtures/http_server'
describe "Net::HTTP#unlock" do
before :each do
diff --git a/spec/ruby/library/net/http/http/use_ssl_spec.rb b/spec/ruby/library/net/http/http/use_ssl_spec.rb
index 19d065ed8e..be1ec7fa25 100644
--- a/spec/ruby/library/net/http/http/use_ssl_spec.rb
+++ b/spec/ruby/library/net/http/http/use_ssl_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTP#use_ssl?" do
diff --git a/spec/ruby/library/net/http/http/version_1_1_spec.rb b/spec/ruby/library/net/http/http/version_1_1_spec.rb
index f13ec9b7f1..1c069e9ea6 100644
--- a/spec/ruby/library/net/http/http/version_1_1_spec.rb
+++ b/spec/ruby/library/net/http/http/version_1_1_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/version_1_1', __FILE__)
+require_relative 'shared/version_1_1'
describe "Net::HTTP.version_1_1?" do
it_behaves_like :net_http_version_1_1_p, :version_1_1?
diff --git a/spec/ruby/library/net/http/http/version_1_2_spec.rb b/spec/ruby/library/net/http/http/version_1_2_spec.rb
index 63c2112422..4e601462c9 100644
--- a/spec/ruby/library/net/http/http/version_1_2_spec.rb
+++ b/spec/ruby/library/net/http/http/version_1_2_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/version_1_2', __FILE__)
+require_relative 'shared/version_1_2'
describe "Net::HTTP.version_1_2" do
it "turns on net/http 1.2 features" do
diff --git a/spec/ruby/library/net/http/httpexceptions/initialize_spec.rb b/spec/ruby/library/net/http/httpexceptions/initialize_spec.rb
index 8c0c4934f7..8e3fd8cc02 100644
--- a/spec/ruby/library/net/http/httpexceptions/initialize_spec.rb
+++ b/spec/ruby/library/net/http/httpexceptions/initialize_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPExceptions#initialize when passed message, response" do
before :each do
diff --git a/spec/ruby/library/net/http/httpexceptions/response_spec.rb b/spec/ruby/library/net/http/httpexceptions/response_spec.rb
index becf74bddf..205b2bc212 100644
--- a/spec/ruby/library/net/http/httpexceptions/response_spec.rb
+++ b/spec/ruby/library/net/http/httpexceptions/response_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPExceptions#response" do
it "returns self's response" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/body_exist_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/body_exist_spec.rb
index cb3565b899..ab56176a5c 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/body_exist_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/body_exist_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#body_exist?" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/body_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/body_spec.rb
index 4aa4fff2bc..a215895b57 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/body_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/body_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
diff --git a/spec/ruby/library/net/http/httpgenericrequest/body_stream_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/body_stream_spec.rb
index df6e02a8c1..c2a60e6836 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/body_stream_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/body_stream_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
diff --git a/spec/ruby/library/net/http/httpgenericrequest/exec_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/exec_spec.rb
index b3850d6c74..90e158a159 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/exec_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/exec_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
diff --git a/spec/ruby/library/net/http/httpgenericrequest/inspect_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/inspect_spec.rb
index 269ce4fe52..36240949c3 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/inspect_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/inspect_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#inspect" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/method_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/method_spec.rb
index eef87ff3a7..3f7c2cbf2b 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/method_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/method_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#method" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/path_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/path_spec.rb
index e48d37b0e9..fc4cf9af53 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/path_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/path_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#path" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/request_body_permitted_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/request_body_permitted_spec.rb
index 1e0b3ab028..50cd1ff637 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/request_body_permitted_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/request_body_permitted_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#request_body_permitted?" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/response_body_permitted_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/response_body_permitted_spec.rb
index ee5a43e637..0c4165d0ab 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/response_body_permitted_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/response_body_permitted_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#response_body_permitted?" do
diff --git a/spec/ruby/library/net/http/httpgenericrequest/set_body_internal_spec.rb b/spec/ruby/library/net/http/httpgenericrequest/set_body_internal_spec.rb
index bff8646d5a..ef2edc019a 100644
--- a/spec/ruby/library/net/http/httpgenericrequest/set_body_internal_spec.rb
+++ b/spec/ruby/library/net/http/httpgenericrequest/set_body_internal_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPGenericRequest#set_body_internal when passed string" do
diff --git a/spec/ruby/library/net/http/httpheader/add_field_spec.rb b/spec/ruby/library/net/http/httpheader/add_field_spec.rb
index b736a92694..882d5ac5bb 100644
--- a/spec/ruby/library/net/http/httpheader/add_field_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/add_field_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#add_field when passed key, value" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/basic_auth_spec.rb b/spec/ruby/library/net/http/httpheader/basic_auth_spec.rb
index b9ed792d46..fa2a710fe1 100644
--- a/spec/ruby/library/net/http/httpheader/basic_auth_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/basic_auth_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#basic_auth when passed account, password" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/canonical_each_spec.rb b/spec/ruby/library/net/http/httpheader/canonical_each_spec.rb
index a891c12d80..0dddd3049b 100644
--- a/spec/ruby/library/net/http/httpheader/canonical_each_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/canonical_each_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_capitalized', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_capitalized'
describe "Net::HTTPHeader#canonical_each" do
it_behaves_like :net_httpheader_each_capitalized, :canonical_each
diff --git a/spec/ruby/library/net/http/httpheader/chunked_spec.rb b/spec/ruby/library/net/http/httpheader/chunked_spec.rb
index 2b08baf34c..96b758981b 100644
--- a/spec/ruby/library/net/http/httpheader/chunked_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/chunked_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#chunked?" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/content_length_spec.rb b/spec/ruby/library/net/http/httpheader/content_length_spec.rb
index d93eb3a608..44c971c98e 100644
--- a/spec/ruby/library/net/http/httpheader/content_length_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/content_length_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#content_length" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/content_range_spec.rb b/spec/ruby/library/net/http/httpheader/content_range_spec.rb
index dc601fb365..23dc92348b 100644
--- a/spec/ruby/library/net/http/httpheader/content_range_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/content_range_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#content_range" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/content_type_spec.rb b/spec/ruby/library/net/http/httpheader/content_type_spec.rb
index 7c3dfba7e7..1f8b4ba326 100644
--- a/spec/ruby/library/net/http/httpheader/content_type_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/content_type_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_content_type', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_content_type'
describe "Net::HTTPHeader#content_type" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/delete_spec.rb b/spec/ruby/library/net/http/httpheader/delete_spec.rb
index 9adbfd7813..603ae198de 100644
--- a/spec/ruby/library/net/http/httpheader/delete_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/delete_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#delete when passed key" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/each_capitalized_name_spec.rb b/spec/ruby/library/net/http/httpheader/each_capitalized_name_spec.rb
index 7adba9dec5..1af2c6939c 100644
--- a/spec/ruby/library/net/http/httpheader/each_capitalized_name_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_capitalized_name_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#each_capitalized_name" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/each_capitalized_spec.rb b/spec/ruby/library/net/http/httpheader/each_capitalized_spec.rb
index 1dcf18a9d1..49298210bb 100644
--- a/spec/ruby/library/net/http/httpheader/each_capitalized_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_capitalized_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_capitalized', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_capitalized'
describe "Net::HTTPHeader#each_capitalized" do
it_behaves_like :net_httpheader_each_capitalized, :each_capitalized
diff --git a/spec/ruby/library/net/http/httpheader/each_header_spec.rb b/spec/ruby/library/net/http/httpheader/each_header_spec.rb
index 00d5894282..19634a001b 100644
--- a/spec/ruby/library/net/http/httpheader/each_header_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_header_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_header', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_header'
describe "Net::HTTPHeader#each_header" do
it_behaves_like :net_httpheader_each_header, :each_header
diff --git a/spec/ruby/library/net/http/httpheader/each_key_spec.rb b/spec/ruby/library/net/http/httpheader/each_key_spec.rb
index 5c81830be6..ebb17d2eac 100644
--- a/spec/ruby/library/net/http/httpheader/each_key_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_key_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_name', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_name'
describe "Net::HTTPHeader#each_key" do
it_behaves_like :net_httpheader_each_name, :each_key
diff --git a/spec/ruby/library/net/http/httpheader/each_name_spec.rb b/spec/ruby/library/net/http/httpheader/each_name_spec.rb
index e785ae249a..f4533ebcfb 100644
--- a/spec/ruby/library/net/http/httpheader/each_name_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_name_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_name', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_name'
describe "Net::HTTPHeader#each_name" do
it_behaves_like :net_httpheader_each_name, :each_name
diff --git a/spec/ruby/library/net/http/httpheader/each_spec.rb b/spec/ruby/library/net/http/httpheader/each_spec.rb
index e8fb6713c3..7ba8434f75 100644
--- a/spec/ruby/library/net/http/httpheader/each_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/each_header', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/each_header'
describe "Net::HTTPHeader#each" do
it_behaves_like :net_httpheader_each_header, :each
diff --git a/spec/ruby/library/net/http/httpheader/each_value_spec.rb b/spec/ruby/library/net/http/httpheader/each_value_spec.rb
index 1adb723a53..3224de7703 100644
--- a/spec/ruby/library/net/http/httpheader/each_value_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/each_value_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#each_value" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/element_reference_spec.rb b/spec/ruby/library/net/http/httpheader/element_reference_spec.rb
index bfe6b48ad4..4a35e20d20 100644
--- a/spec/ruby/library/net/http/httpheader/element_reference_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/element_reference_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#[] when passed key" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/element_set_spec.rb b/spec/ruby/library/net/http/httpheader/element_set_spec.rb
index a5a2900e94..e9ad64fafc 100644
--- a/spec/ruby/library/net/http/httpheader/element_set_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/element_set_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#[]= when passed key, value" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/fetch_spec.rb b/spec/ruby/library/net/http/httpheader/fetch_spec.rb
index 7182c4396e..4d608cdb0d 100644
--- a/spec/ruby/library/net/http/httpheader/fetch_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/fetch_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#fetch" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/form_data_spec.rb b/spec/ruby/library/net/http/httpheader/form_data_spec.rb
index 7781990824..9b29a03159 100644
--- a/spec/ruby/library/net/http/httpheader/form_data_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/form_data_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_form_data', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_form_data'
describe "Net::HTTPHeader#form_data=" do
it_behaves_like :net_httpheader_set_form_data, :form_data=
diff --git a/spec/ruby/library/net/http/httpheader/get_fields_spec.rb b/spec/ruby/library/net/http/httpheader/get_fields_spec.rb
index f7828f752c..1b623bf2a3 100644
--- a/spec/ruby/library/net/http/httpheader/get_fields_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/get_fields_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#get_fields when passed key" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/initialize_http_header_spec.rb b/spec/ruby/library/net/http/httpheader/initialize_http_header_spec.rb
index ffb56642d4..92a0b82d60 100644
--- a/spec/ruby/library/net/http/httpheader/initialize_http_header_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/initialize_http_header_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#initialize_http_header when passed Hash" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/key_spec.rb b/spec/ruby/library/net/http/httpheader/key_spec.rb
index 0cb5f711dc..9099024229 100644
--- a/spec/ruby/library/net/http/httpheader/key_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/key_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#key? when passed key" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/length_spec.rb b/spec/ruby/library/net/http/httpheader/length_spec.rb
index 50cb1c1f7f..0d1da149f4 100644
--- a/spec/ruby/library/net/http/httpheader/length_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/length_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/size', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/size'
describe "Net::HTTPHeader#length" do
it_behaves_like :net_httpheader_size, :length
diff --git a/spec/ruby/library/net/http/httpheader/main_type_spec.rb b/spec/ruby/library/net/http/httpheader/main_type_spec.rb
index 34e2ddbc65..3e18de6b5b 100644
--- a/spec/ruby/library/net/http/httpheader/main_type_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/main_type_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#main_type" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/proxy_basic_auth_spec.rb b/spec/ruby/library/net/http/httpheader/proxy_basic_auth_spec.rb
index 5e7d87af36..8b576ee164 100644
--- a/spec/ruby/library/net/http/httpheader/proxy_basic_auth_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/proxy_basic_auth_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#proxy_basic_auth when passed account, password" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/range_length_spec.rb b/spec/ruby/library/net/http/httpheader/range_length_spec.rb
index ec3b00d805..4415c8e5ba 100644
--- a/spec/ruby/library/net/http/httpheader/range_length_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/range_length_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#range_length" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/range_spec.rb b/spec/ruby/library/net/http/httpheader/range_spec.rb
index d71d2ed598..5f06e03a1c 100644
--- a/spec/ruby/library/net/http/httpheader/range_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/range_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_range', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_range'
describe "Net::HTTPHeader#range" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/set_content_type_spec.rb b/spec/ruby/library/net/http/httpheader/set_content_type_spec.rb
index b9a62154ad..125f7a7e0d 100644
--- a/spec/ruby/library/net/http/httpheader/set_content_type_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/set_content_type_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_content_type', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_content_type'
describe "Net::HTTPHeader#set_content_type" do
it_behaves_like :net_httpheader_set_content_type, :set_content_type
diff --git a/spec/ruby/library/net/http/httpheader/set_form_data_spec.rb b/spec/ruby/library/net/http/httpheader/set_form_data_spec.rb
index e675437ba4..14c66ae01c 100644
--- a/spec/ruby/library/net/http/httpheader/set_form_data_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/set_form_data_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_form_data', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_form_data'
describe "Net::HTTPHeader#set_form_data" do
it_behaves_like :net_httpheader_set_form_data, :set_form_data
diff --git a/spec/ruby/library/net/http/httpheader/set_range_spec.rb b/spec/ruby/library/net/http/httpheader/set_range_spec.rb
index af3f00f99c..85b9c50422 100644
--- a/spec/ruby/library/net/http/httpheader/set_range_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/set_range_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/set_range', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/set_range'
describe "Net::HTTPHeader#set_range" do
it_behaves_like :net_httpheader_set_range, :set_range
diff --git a/spec/ruby/library/net/http/httpheader/size_spec.rb b/spec/ruby/library/net/http/httpheader/size_spec.rb
index 3ea3969046..a7d78f96e0 100644
--- a/spec/ruby/library/net/http/httpheader/size_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/size_spec.rb
@@ -1,7 +1,7 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
-require File.expand_path('../shared/size', __FILE__)
+require_relative 'fixtures/classes'
+require_relative 'shared/size'
describe "Net::HTTPHeader#size" do
it_behaves_like :net_httpheader_size, :size
diff --git a/spec/ruby/library/net/http/httpheader/sub_type_spec.rb b/spec/ruby/library/net/http/httpheader/sub_type_spec.rb
index 65cae5a3f3..3c73ca0027 100644
--- a/spec/ruby/library/net/http/httpheader/sub_type_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/sub_type_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#sub_type" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/to_hash_spec.rb b/spec/ruby/library/net/http/httpheader/to_hash_spec.rb
index 4b59c78c90..8c1d36c30a 100644
--- a/spec/ruby/library/net/http/httpheader/to_hash_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/to_hash_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#to_hash" do
before :each do
diff --git a/spec/ruby/library/net/http/httpheader/type_params_spec.rb b/spec/ruby/library/net/http/httpheader/type_params_spec.rb
index f4cd54f101..e77be7ea85 100644
--- a/spec/ruby/library/net/http/httpheader/type_params_spec.rb
+++ b/spec/ruby/library/net/http/httpheader/type_params_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../fixtures/classes', __FILE__)
+require_relative 'fixtures/classes'
describe "Net::HTTPHeader#type_params" do
before :each do
diff --git a/spec/ruby/library/net/http/httprequest/initialize_spec.rb b/spec/ruby/library/net/http/httprequest/initialize_spec.rb
index 8abbf13c93..88e9fb1c77 100644
--- a/spec/ruby/library/net/http/httprequest/initialize_spec.rb
+++ b/spec/ruby/library/net/http/httprequest/initialize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
module NetHTTPRequestSpecs
diff --git a/spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb b/spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb
index 9688b0759e..68a0454f79 100644
--- a/spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/body_permitted_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse.body_permitted?" do
diff --git a/spec/ruby/library/net/http/httpresponse/body_spec.rb b/spec/ruby/library/net/http/httpresponse/body_spec.rb
index 169a6687a2..79569441f1 100644
--- a/spec/ruby/library/net/http/httpresponse/body_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/body_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/body', __FILE__)
+require_relative 'shared/body'
describe "Net::HTTPResponse#body" do
it_behaves_like :net_httpresponse_body, :body
diff --git a/spec/ruby/library/net/http/httpresponse/code_spec.rb b/spec/ruby/library/net/http/httpresponse/code_spec.rb
index 9430af3100..114277cb43 100644
--- a/spec/ruby/library/net/http/httpresponse/code_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/code_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#code" do
diff --git a/spec/ruby/library/net/http/httpresponse/code_type_spec.rb b/spec/ruby/library/net/http/httpresponse/code_type_spec.rb
index 899c2ed9bf..fa2d572e9a 100644
--- a/spec/ruby/library/net/http/httpresponse/code_type_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/code_type_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#code_type" do
diff --git a/spec/ruby/library/net/http/httpresponse/entity_spec.rb b/spec/ruby/library/net/http/httpresponse/entity_spec.rb
index 3b6be5eb00..f1639042c1 100644
--- a/spec/ruby/library/net/http/httpresponse/entity_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/entity_spec.rb
@@ -1,6 +1,6 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
-require File.expand_path('../shared/body', __FILE__)
+require_relative 'shared/body'
describe "Net::HTTPResponse#entity" do
it_behaves_like :net_httpresponse_body, :entity
diff --git a/spec/ruby/library/net/http/httpresponse/error_spec.rb b/spec/ruby/library/net/http/httpresponse/error_spec.rb
index 7b0f61e520..24297d5fad 100644
--- a/spec/ruby/library/net/http/httpresponse/error_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/error_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#error!" do
diff --git a/spec/ruby/library/net/http/httpresponse/error_type_spec.rb b/spec/ruby/library/net/http/httpresponse/error_type_spec.rb
index a6b0155998..9e45e8fac2 100644
--- a/spec/ruby/library/net/http/httpresponse/error_type_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/error_type_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#error_type" do
diff --git a/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb b/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb
index e1a48e0c12..74839463b7 100644
--- a/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/exception_type_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse.exception_type" do
diff --git a/spec/ruby/library/net/http/httpresponse/header_spec.rb b/spec/ruby/library/net/http/httpresponse/header_spec.rb
index 21e3dec418..a9615feda8 100644
--- a/spec/ruby/library/net/http/httpresponse/header_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/header_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#header" do
diff --git a/spec/ruby/library/net/http/httpresponse/http_version_spec.rb b/spec/ruby/library/net/http/httpresponse/http_version_spec.rb
index a1192c1cbe..db85696d77 100644
--- a/spec/ruby/library/net/http/httpresponse/http_version_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/http_version_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#http_version" do
diff --git a/spec/ruby/library/net/http/httpresponse/initialize_spec.rb b/spec/ruby/library/net/http/httpresponse/initialize_spec.rb
index dcb6da3afe..eb77e2e277 100644
--- a/spec/ruby/library/net/http/httpresponse/initialize_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/initialize_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#initialize when passed http_version, response_code, response_message" do
diff --git a/spec/ruby/library/net/http/httpresponse/inspect_spec.rb b/spec/ruby/library/net/http/httpresponse/inspect_spec.rb
index f5463afa96..1e1a2c7cc7 100644
--- a/spec/ruby/library/net/http/httpresponse/inspect_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/inspect_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
diff --git a/spec/ruby/library/net/http/httpresponse/message_spec.rb b/spec/ruby/library/net/http/httpresponse/message_spec.rb
index 57a927aff0..ae8e3678a1 100644
--- a/spec/ruby/library/net/http/httpresponse/message_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/message_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#message" do
diff --git a/spec/ruby/library/net/http/httpresponse/msg_spec.rb b/spec/ruby/library/net/http/httpresponse/msg_spec.rb
index 9b19d34234..0e5e7eb4aa 100644
--- a/spec/ruby/library/net/http/httpresponse/msg_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/msg_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#msg" do
diff --git a/spec/ruby/library/net/http/httpresponse/read_body_spec.rb b/spec/ruby/library/net/http/httpresponse/read_body_spec.rb
index d71b4144f4..f1fc0f519b 100644
--- a/spec/ruby/library/net/http/httpresponse/read_body_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/read_body_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#read_body" do
diff --git a/spec/ruby/library/net/http/httpresponse/read_header_spec.rb b/spec/ruby/library/net/http/httpresponse/read_header_spec.rb
index 6bbabdfe10..6af8c6bd6a 100644
--- a/spec/ruby/library/net/http/httpresponse/read_header_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/read_header_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#read_header" do
diff --git a/spec/ruby/library/net/http/httpresponse/read_new_spec.rb b/spec/ruby/library/net/http/httpresponse/read_new_spec.rb
index e2fb0f1a05..73c7ddc100 100644
--- a/spec/ruby/library/net/http/httpresponse/read_new_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/read_new_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse.read_new" do
diff --git a/spec/ruby/library/net/http/httpresponse/reading_body_spec.rb b/spec/ruby/library/net/http/httpresponse/reading_body_spec.rb
index 5e53e00adc..ebdab891e1 100644
--- a/spec/ruby/library/net/http/httpresponse/reading_body_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/reading_body_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
require "stringio"
diff --git a/spec/ruby/library/net/http/httpresponse/response_spec.rb b/spec/ruby/library/net/http/httpresponse/response_spec.rb
index 826320be9e..f6035f3695 100644
--- a/spec/ruby/library/net/http/httpresponse/response_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/response_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#response" do
diff --git a/spec/ruby/library/net/http/httpresponse/value_spec.rb b/spec/ruby/library/net/http/httpresponse/value_spec.rb
index 7e4f7863eb..c53d724b40 100644
--- a/spec/ruby/library/net/http/httpresponse/value_spec.rb
+++ b/spec/ruby/library/net/http/httpresponse/value_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../../spec_helper', __FILE__)
+require_relative '../../../../spec_helper'
require 'net/http'
describe "Net::HTTPResponse#value" do