diff options
Diffstat (limited to 'spec/ruby/core/time')
63 files changed, 96 insertions, 96 deletions
diff --git a/spec/ruby/core/time/_dump_spec.rb b/spec/ruby/core/time/_dump_spec.rb index bec16dab69..04afec0879 100644 --- a/spec/ruby/core/time/_dump_spec.rb +++ b/spec/ruby/core/time/_dump_spec.rb @@ -1,5 +1,5 @@ # -*- encoding: binary -*- -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#_dump" do before :each do diff --git a/spec/ruby/core/time/_load_spec.rb b/spec/ruby/core/time/_load_spec.rb index 12fcb219ed..5f6275d46c 100644 --- a/spec/ruby/core/time/_load_spec.rb +++ b/spec/ruby/core/time/_load_spec.rb @@ -1,5 +1,5 @@ # -*- encoding: binary -*- -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time._load" do it "is a private method" do diff --git a/spec/ruby/core/time/asctime_spec.rb b/spec/ruby/core/time/asctime_spec.rb index 1b2bb16fdf..a41ee531e4 100644 --- a/spec/ruby/core/time/asctime_spec.rb +++ b/spec/ruby/core/time/asctime_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/asctime', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/asctime' describe "Time#asctime" do it_behaves_like :time_asctime, :asctime diff --git a/spec/ruby/core/time/at_spec.rb b/spec/ruby/core/time/at_spec.rb index 58cacbf8f5..8363a0bc70 100644 --- a/spec/ruby/core/time/at_spec.rb +++ b/spec/ruby/core/time/at_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time.at" do describe "passed Numeric" do diff --git a/spec/ruby/core/time/comparison_spec.rb b/spec/ruby/core/time/comparison_spec.rb index c5a5b83d28..44d8778da4 100644 --- a/spec/ruby/core/time/comparison_spec.rb +++ b/spec/ruby/core/time/comparison_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#<=>" do it "returns 1 if the first argument is a point in time after the second argument" do diff --git a/spec/ruby/core/time/ctime_spec.rb b/spec/ruby/core/time/ctime_spec.rb index dce85620e0..57e7cfd9ce 100644 --- a/spec/ruby/core/time/ctime_spec.rb +++ b/spec/ruby/core/time/ctime_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/asctime', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/asctime' describe "Time#ctime" do it_behaves_like :time_asctime, :ctime diff --git a/spec/ruby/core/time/day_spec.rb b/spec/ruby/core/time/day_spec.rb index 817942dbaf..895bcd7a86 100644 --- a/spec/ruby/core/time/day_spec.rb +++ b/spec/ruby/core/time/day_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/day', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/day' describe "Time#day" do it_behaves_like :time_day, :day diff --git a/spec/ruby/core/time/dst_spec.rb b/spec/ruby/core/time/dst_spec.rb index 4a05fa93a5..436240aae5 100644 --- a/spec/ruby/core/time/dst_spec.rb +++ b/spec/ruby/core/time/dst_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/isdst', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/isdst' describe "Time#dst?" do it_behaves_like :time_isdst, :dst? diff --git a/spec/ruby/core/time/dup_spec.rb b/spec/ruby/core/time/dup_spec.rb index b32ce96d44..ee2ff7dbba 100644 --- a/spec/ruby/core/time/dup_spec.rb +++ b/spec/ruby/core/time/dup_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#dup" do it "returns a Time object that represents the same time" do diff --git a/spec/ruby/core/time/eql_spec.rb b/spec/ruby/core/time/eql_spec.rb index af96c96cc3..2ffb4eec96 100644 --- a/spec/ruby/core/time/eql_spec.rb +++ b/spec/ruby/core/time/eql_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#eql?" do it "returns true if self and other have the same whole number of seconds" do diff --git a/spec/ruby/core/time/friday_spec.rb b/spec/ruby/core/time/friday_spec.rb index d38a261080..27f9e1dbe5 100644 --- a/spec/ruby/core/time/friday_spec.rb +++ b/spec/ruby/core/time/friday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#friday?" do it "returns true if time represents Friday" do diff --git a/spec/ruby/core/time/getgm_spec.rb b/spec/ruby/core/time/getgm_spec.rb index be8691feb1..b5d45b1d9f 100644 --- a/spec/ruby/core/time/getgm_spec.rb +++ b/spec/ruby/core/time/getgm_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/getgm', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/getgm' describe "Time#getgm" do it_behaves_like :time_getgm, :getgm diff --git a/spec/ruby/core/time/getlocal_spec.rb b/spec/ruby/core/time/getlocal_spec.rb index a94d7f751b..39374a3816 100644 --- a/spec/ruby/core/time/getlocal_spec.rb +++ b/spec/ruby/core/time/getlocal_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#getlocal" do it "returns a new time which is the local representation of time" do diff --git a/spec/ruby/core/time/getutc_spec.rb b/spec/ruby/core/time/getutc_spec.rb index 5c70e3e7cc..0cd9c17b00 100644 --- a/spec/ruby/core/time/getutc_spec.rb +++ b/spec/ruby/core/time/getutc_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/getgm', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/getgm' describe "Time#getutc" do it_behaves_like :time_getgm, :getutc diff --git a/spec/ruby/core/time/gm_spec.rb b/spec/ruby/core/time/gm_spec.rb index 3d3fdb16e7..26dffbcedc 100644 --- a/spec/ruby/core/time/gm_spec.rb +++ b/spec/ruby/core/time/gm_spec.rb @@ -1,6 +1,6 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gm', __FILE__) -require File.expand_path('../shared/time_params', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gm' +require_relative 'shared/time_params' describe "Time.gm" do it_behaves_like :time_gm, :gm diff --git a/spec/ruby/core/time/gmt_offset_spec.rb b/spec/ruby/core/time/gmt_offset_spec.rb index bf2adb7d78..df417e6e4e 100644 --- a/spec/ruby/core/time/gmt_offset_spec.rb +++ b/spec/ruby/core/time/gmt_offset_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gmt_offset', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gmt_offset' describe "Time#gmt_offset" do it_behaves_like :time_gmt_offset, :gmt_offset diff --git a/spec/ruby/core/time/gmt_spec.rb b/spec/ruby/core/time/gmt_spec.rb index 78ebcd0f5e..7e85749d5b 100644 --- a/spec/ruby/core/time/gmt_spec.rb +++ b/spec/ruby/core/time/gmt_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#gmt?" do it "returns true if time represents a time in UTC (GMT)" do diff --git a/spec/ruby/core/time/gmtime_spec.rb b/spec/ruby/core/time/gmtime_spec.rb index c888bb8f4d..d965cd541d 100644 --- a/spec/ruby/core/time/gmtime_spec.rb +++ b/spec/ruby/core/time/gmtime_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gmtime', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gmtime' describe "Time#gmtime" do it_behaves_like :time_gmtime, :gmtime diff --git a/spec/ruby/core/time/gmtoff_spec.rb b/spec/ruby/core/time/gmtoff_spec.rb index 8ef61997fe..fa28520e9e 100644 --- a/spec/ruby/core/time/gmtoff_spec.rb +++ b/spec/ruby/core/time/gmtoff_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gmt_offset', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gmt_offset' describe "Time#gmtoff" do it_behaves_like :time_gmt_offset, :gmtoff diff --git a/spec/ruby/core/time/hash_spec.rb b/spec/ruby/core/time/hash_spec.rb index 77014c5dc8..577aaf9b0a 100644 --- a/spec/ruby/core/time/hash_spec.rb +++ b/spec/ruby/core/time/hash_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#hash" do it "returns a Fixnum" do diff --git a/spec/ruby/core/time/hour_spec.rb b/spec/ruby/core/time/hour_spec.rb index 65a2ae6ad7..ca69c25adb 100644 --- a/spec/ruby/core/time/hour_spec.rb +++ b/spec/ruby/core/time/hour_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#hour" do it "returns the hour of the day (0..23) for a local Time" do diff --git a/spec/ruby/core/time/inspect_spec.rb b/spec/ruby/core/time/inspect_spec.rb index 7f57a2c4cb..01e1dfdaa6 100644 --- a/spec/ruby/core/time/inspect_spec.rb +++ b/spec/ruby/core/time/inspect_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/inspect', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/inspect' describe "Time#inspect" do it_behaves_like :inspect, :inspect diff --git a/spec/ruby/core/time/isdst_spec.rb b/spec/ruby/core/time/isdst_spec.rb index 6c5664ce2a..173230ca07 100644 --- a/spec/ruby/core/time/isdst_spec.rb +++ b/spec/ruby/core/time/isdst_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/isdst', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/isdst' describe "Time#isdst" do it_behaves_like :time_isdst, :isdst diff --git a/spec/ruby/core/time/local_spec.rb b/spec/ruby/core/time/local_spec.rb index 5c1894b910..581ed171d5 100644 --- a/spec/ruby/core/time/local_spec.rb +++ b/spec/ruby/core/time/local_spec.rb @@ -1,6 +1,6 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/local', __FILE__) -require File.expand_path('../shared/time_params', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/local' +require_relative 'shared/time_params' describe "Time.local" do it_behaves_like :time_local, :local diff --git a/spec/ruby/core/time/localtime_spec.rb b/spec/ruby/core/time/localtime_spec.rb index 6f682b0b34..56c9d37bc8 100644 --- a/spec/ruby/core/time/localtime_spec.rb +++ b/spec/ruby/core/time/localtime_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#localtime" do it "converts self to local time, modifying the receiver" do diff --git a/spec/ruby/core/time/mday_spec.rb b/spec/ruby/core/time/mday_spec.rb index e1b340e9cb..3c21939890 100644 --- a/spec/ruby/core/time/mday_spec.rb +++ b/spec/ruby/core/time/mday_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/day', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/day' describe "Time#mday" do it_behaves_like :time_day, :mday diff --git a/spec/ruby/core/time/min_spec.rb b/spec/ruby/core/time/min_spec.rb index c1c3ebed3b..7d087d4046 100644 --- a/spec/ruby/core/time/min_spec.rb +++ b/spec/ruby/core/time/min_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#min" do it "returns the minute of the hour (0..59) for a local Time" do diff --git a/spec/ruby/core/time/minus_spec.rb b/spec/ruby/core/time/minus_spec.rb index 4e2bb60333..7c4b21f0d5 100644 --- a/spec/ruby/core/time/minus_spec.rb +++ b/spec/ruby/core/time/minus_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#-" do it "decrements the time by the specified amount" do diff --git a/spec/ruby/core/time/mktime_spec.rb b/spec/ruby/core/time/mktime_spec.rb index 9ff05d94a8..78a6a6e772 100644 --- a/spec/ruby/core/time/mktime_spec.rb +++ b/spec/ruby/core/time/mktime_spec.rb @@ -1,6 +1,6 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/local', __FILE__) -require File.expand_path('../shared/time_params', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/local' +require_relative 'shared/time_params' describe "Time.mktime" do it_behaves_like :time_local, :mktime diff --git a/spec/ruby/core/time/mon_spec.rb b/spec/ruby/core/time/mon_spec.rb index 0e52788ead..f41b39648b 100644 --- a/spec/ruby/core/time/mon_spec.rb +++ b/spec/ruby/core/time/mon_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/month', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/month' describe "Time#mon" do it_behaves_like :time_month, :mon diff --git a/spec/ruby/core/time/monday_spec.rb b/spec/ruby/core/time/monday_spec.rb index 47b09c9a07..c5c43a5c3e 100644 --- a/spec/ruby/core/time/monday_spec.rb +++ b/spec/ruby/core/time/monday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#monday?" do it "returns true if time represents Monday" do diff --git a/spec/ruby/core/time/month_spec.rb b/spec/ruby/core/time/month_spec.rb index c5e1c1c7fe..81e20384ab 100644 --- a/spec/ruby/core/time/month_spec.rb +++ b/spec/ruby/core/time/month_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/month', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/month' describe "Time#month" do it_behaves_like :time_month, :month diff --git a/spec/ruby/core/time/new_spec.rb b/spec/ruby/core/time/new_spec.rb index f81900a07b..2bffe839b8 100644 --- a/spec/ruby/core/time/new_spec.rb +++ b/spec/ruby/core/time/new_spec.rb @@ -1,7 +1,7 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/now', __FILE__) -require File.expand_path('../shared/local', __FILE__) -require File.expand_path('../shared/time_params', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/now' +require_relative 'shared/local' +require_relative 'shared/time_params' describe "Time.new" do it_behaves_like :time_now, :new diff --git a/spec/ruby/core/time/now_spec.rb b/spec/ruby/core/time/now_spec.rb index 3dd86ff7d5..7dc7951996 100644 --- a/spec/ruby/core/time/now_spec.rb +++ b/spec/ruby/core/time/now_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/now', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/now' describe "Time.now" do it_behaves_like :time_now, :now diff --git a/spec/ruby/core/time/nsec_spec.rb b/spec/ruby/core/time/nsec_spec.rb index 3a6be1d016..fb3df6394c 100644 --- a/spec/ruby/core/time/nsec_spec.rb +++ b/spec/ruby/core/time/nsec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#nsec" do it "returns 0 for a Time constructed with a whole number of seconds" do diff --git a/spec/ruby/core/time/plus_spec.rb b/spec/ruby/core/time/plus_spec.rb index 29931f8a87..0cf0d11a74 100644 --- a/spec/ruby/core/time/plus_spec.rb +++ b/spec/ruby/core/time/plus_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#+" do it "increments the time by the specified amount" do diff --git a/spec/ruby/core/time/round_spec.rb b/spec/ruby/core/time/round_spec.rb index 97568802b9..0cbed04ade 100644 --- a/spec/ruby/core/time/round_spec.rb +++ b/spec/ruby/core/time/round_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#round" do before do diff --git a/spec/ruby/core/time/saturday_spec.rb b/spec/ruby/core/time/saturday_spec.rb index 0d827a6184..60ffea4198 100644 --- a/spec/ruby/core/time/saturday_spec.rb +++ b/spec/ruby/core/time/saturday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#saturday?" do it "returns true if time represents Saturday" do diff --git a/spec/ruby/core/time/sec_spec.rb b/spec/ruby/core/time/sec_spec.rb index e753235b53..73fc5ce1fc 100644 --- a/spec/ruby/core/time/sec_spec.rb +++ b/spec/ruby/core/time/sec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#sec" do it "returns the second of the minute(0..60) for time" do diff --git a/spec/ruby/core/time/shared/now.rb b/spec/ruby/core/time/shared/now.rb index c35115fcf4..c548be283f 100644 --- a/spec/ruby/core/time/shared/now.rb +++ b/spec/ruby/core/time/shared/now.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../fixtures/classes', __FILE__) +require_relative '../fixtures/classes' describe :time_now, shared: true do it "creates a subclass instance if called on a subclass" do diff --git a/spec/ruby/core/time/strftime_spec.rb b/spec/ruby/core/time/strftime_spec.rb index 1cb3575eec..62f9272f32 100644 --- a/spec/ruby/core/time/strftime_spec.rb +++ b/spec/ruby/core/time/strftime_spec.rb @@ -1,8 +1,8 @@ # encoding: utf-8 -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../../../shared/time/strftime_for_date', __FILE__) -require File.expand_path('../../../shared/time/strftime_for_time', __FILE__) +require_relative '../../spec_helper' +require_relative '../../shared/time/strftime_for_date' +require_relative '../../shared/time/strftime_for_time' describe "Time#strftime" do before :all do diff --git a/spec/ruby/core/time/subsec_spec.rb b/spec/ruby/core/time/subsec_spec.rb index d9d262a513..583a26412b 100644 --- a/spec/ruby/core/time/subsec_spec.rb +++ b/spec/ruby/core/time/subsec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#subsec" do it "returns 0 as a Fixnum for a Time with a whole number of seconds" do diff --git a/spec/ruby/core/time/succ_spec.rb b/spec/ruby/core/time/succ_spec.rb index ade72165ec..dace9b823e 100644 --- a/spec/ruby/core/time/succ_spec.rb +++ b/spec/ruby/core/time/succ_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#succ" do it "returns a new time one second later than time" do diff --git a/spec/ruby/core/time/sunday_spec.rb b/spec/ruby/core/time/sunday_spec.rb index 823174cf71..2285583579 100644 --- a/spec/ruby/core/time/sunday_spec.rb +++ b/spec/ruby/core/time/sunday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#sunday?" do it "returns true if time represents Sunday" do diff --git a/spec/ruby/core/time/thursday_spec.rb b/spec/ruby/core/time/thursday_spec.rb index 5788fd9bc7..c82d517519 100644 --- a/spec/ruby/core/time/thursday_spec.rb +++ b/spec/ruby/core/time/thursday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#thursday?" do it "returns true if time represents Thursday" do diff --git a/spec/ruby/core/time/time_spec.rb b/spec/ruby/core/time/time_spec.rb index 1c870c8e0f..b0803a7f21 100644 --- a/spec/ruby/core/time/time_spec.rb +++ b/spec/ruby/core/time/time_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time" do it "includes Comparable" do diff --git a/spec/ruby/core/time/to_a_spec.rb b/spec/ruby/core/time/to_a_spec.rb index a4c4a8fbc9..3728b8c526 100644 --- a/spec/ruby/core/time/to_a_spec.rb +++ b/spec/ruby/core/time/to_a_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#to_a" do platform_is_not :windows do diff --git a/spec/ruby/core/time/to_f_spec.rb b/spec/ruby/core/time/to_f_spec.rb index d737848b4b..6101dcf871 100644 --- a/spec/ruby/core/time/to_f_spec.rb +++ b/spec/ruby/core/time/to_f_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#to_f" do it "returns the float number of seconds + usecs since the epoch" do diff --git a/spec/ruby/core/time/to_i_spec.rb b/spec/ruby/core/time/to_i_spec.rb index 1e88c12dd8..54929d1e18 100644 --- a/spec/ruby/core/time/to_i_spec.rb +++ b/spec/ruby/core/time/to_i_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/to_i', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/to_i' describe "Time#to_i" do it_behaves_like :time_to_i, :to_i diff --git a/spec/ruby/core/time/to_r_spec.rb b/spec/ruby/core/time/to_r_spec.rb index 53e469463a..6af2d9b7ea 100644 --- a/spec/ruby/core/time/to_r_spec.rb +++ b/spec/ruby/core/time/to_r_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#to_r" do it "returns the a Rational representing seconds and subseconds since the epoch" do diff --git a/spec/ruby/core/time/to_s_spec.rb b/spec/ruby/core/time/to_s_spec.rb index 8dc81f60a9..ac6c0908ac 100644 --- a/spec/ruby/core/time/to_s_spec.rb +++ b/spec/ruby/core/time/to_s_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/inspect', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/inspect' describe "Time#to_s" do it_behaves_like :inspect, :to_s diff --git a/spec/ruby/core/time/tuesday_spec.rb b/spec/ruby/core/time/tuesday_spec.rb index 87c3236eea..7abbdc92c0 100644 --- a/spec/ruby/core/time/tuesday_spec.rb +++ b/spec/ruby/core/time/tuesday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#tuesday?" do it "returns true if time represents Tuesday" do diff --git a/spec/ruby/core/time/tv_nsec_spec.rb b/spec/ruby/core/time/tv_nsec_spec.rb index d477f6fbec..feb7998b16 100644 --- a/spec/ruby/core/time/tv_nsec_spec.rb +++ b/spec/ruby/core/time/tv_nsec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#tv_nsec" do it "needs to be reviewed for spec completeness" diff --git a/spec/ruby/core/time/tv_sec_spec.rb b/spec/ruby/core/time/tv_sec_spec.rb index 40397d2e11..f83e1fbfdd 100644 --- a/spec/ruby/core/time/tv_sec_spec.rb +++ b/spec/ruby/core/time/tv_sec_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/to_i', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/to_i' describe "Time#tv_sec" do it_behaves_like :time_to_i, :tv_sec diff --git a/spec/ruby/core/time/tv_usec_spec.rb b/spec/ruby/core/time/tv_usec_spec.rb index 4a1b87be7a..f0de4f4a9c 100644 --- a/spec/ruby/core/time/tv_usec_spec.rb +++ b/spec/ruby/core/time/tv_usec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#tv_usec" do it "needs to be reviewed for spec completeness" diff --git a/spec/ruby/core/time/usec_spec.rb b/spec/ruby/core/time/usec_spec.rb index 018253ec77..44cd2047e7 100644 --- a/spec/ruby/core/time/usec_spec.rb +++ b/spec/ruby/core/time/usec_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#usec" do it "returns 0 for a Time constructed with a whole number of seconds" do diff --git a/spec/ruby/core/time/utc_offset_spec.rb b/spec/ruby/core/time/utc_offset_spec.rb index ec5dd3c810..17c031b8c6 100644 --- a/spec/ruby/core/time/utc_offset_spec.rb +++ b/spec/ruby/core/time/utc_offset_spec.rb @@ -1,5 +1,5 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gmt_offset', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gmt_offset' describe "Time#utc_offset" do it_behaves_like :time_gmt_offset, :utc_offset diff --git a/spec/ruby/core/time/utc_spec.rb b/spec/ruby/core/time/utc_spec.rb index cf267517fa..5074c8d54d 100644 --- a/spec/ruby/core/time/utc_spec.rb +++ b/spec/ruby/core/time/utc_spec.rb @@ -1,7 +1,7 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/gm', __FILE__) -require File.expand_path('../shared/gmtime', __FILE__) -require File.expand_path('../shared/time_params', __FILE__) +require_relative '../../spec_helper' +require_relative 'shared/gm' +require_relative 'shared/gmtime' +require_relative 'shared/time_params' describe "Time#utc?" do it "returns true if time represents a time in UTC (GMT)" do diff --git a/spec/ruby/core/time/wday_spec.rb b/spec/ruby/core/time/wday_spec.rb index 72bc718356..9f63f67de9 100644 --- a/spec/ruby/core/time/wday_spec.rb +++ b/spec/ruby/core/time/wday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#wday" do it "returns an integer representing the day of the week, 0..6, with Sunday being 0" do diff --git a/spec/ruby/core/time/wednesday_spec.rb b/spec/ruby/core/time/wednesday_spec.rb index 8e836e3e02..6a52c3577b 100644 --- a/spec/ruby/core/time/wednesday_spec.rb +++ b/spec/ruby/core/time/wednesday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#wednesday?" do it "returns true if time represents Wednesday" do diff --git a/spec/ruby/core/time/yday_spec.rb b/spec/ruby/core/time/yday_spec.rb index 2b7aca1565..6ea5ff8f1b 100644 --- a/spec/ruby/core/time/yday_spec.rb +++ b/spec/ruby/core/time/yday_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#yday" do it "returns an integer representing the day of the year, 1..366" do diff --git a/spec/ruby/core/time/year_spec.rb b/spec/ruby/core/time/year_spec.rb index 4e18eb1353..d2d50062c5 100644 --- a/spec/ruby/core/time/year_spec.rb +++ b/spec/ruby/core/time/year_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#year" do it "returns the four digit year for a local Time as an Integer" do diff --git a/spec/ruby/core/time/zone_spec.rb b/spec/ruby/core/time/zone_spec.rb index 9c7acd66e3..45c9e852ea 100644 --- a/spec/ruby/core/time/zone_spec.rb +++ b/spec/ruby/core/time/zone_spec.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' describe "Time#zone" do platform_is_not :windows do |