diff options
Diffstat (limited to 'spec/ruby')
-rw-r--r-- | spec/ruby/core/time/minus_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/time/plus_spec.rb | 6 | ||||
-rw-r--r-- | spec/ruby/core/time/succ_spec.rb | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/time/minus_spec.rb b/spec/ruby/core/time/minus_spec.rb index e0fbf94cb0..65613d11e9 100644 --- a/spec/ruby/core/time/minus_spec.rb +++ b/spec/ruby/core/time/minus_spec.rb @@ -92,17 +92,17 @@ describe "Time#-" do it "preserves time zone" do time_with_zone = Time.now.utc - time_with_zone.zone.should == (time_with_zone - 60*60).zone + time_with_zone.zone.should == (time_with_zone - 1).zone time_with_zone = Time.now - time_with_zone.zone.should == (time_with_zone - 60*60).zone + time_with_zone.zone.should == (time_with_zone - 1).zone end ruby_version_is "2.6" do context "zone is a timezone object" do it "preserves time zone" do zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60)) - time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 60*60 + time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 1 time.zone.should == zone end diff --git a/spec/ruby/core/time/plus_spec.rb b/spec/ruby/core/time/plus_spec.rb index 0a9984f180..6c29baf124 100644 --- a/spec/ruby/core/time/plus_spec.rb +++ b/spec/ruby/core/time/plus_spec.rb @@ -50,17 +50,17 @@ describe "Time#+" do it "preserves time zone" do time_with_zone = Time.now.utc - time_with_zone.zone.should == (time_with_zone + 60*60).zone + time_with_zone.zone.should == (time_with_zone + 1).zone time_with_zone = Time.now - time_with_zone.zone.should == (time_with_zone + 60*60).zone + time_with_zone.zone.should == (time_with_zone + 1).zone end ruby_version_is "2.6" do context "zone is a timezone object" do it "preserves time zone" do zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60)) - time = Time.new(2012, 1, 1, 12, 0, 0, zone) + 60*60 + time = Time.new(2012, 1, 1, 12, 0, 0, zone) + 1 time.zone.should == zone end diff --git a/spec/ruby/core/time/succ_spec.rb b/spec/ruby/core/time/succ_spec.rb index e68e64b0cc..532448a1dc 100644 --- a/spec/ruby/core/time/succ_spec.rb +++ b/spec/ruby/core/time/succ_spec.rb @@ -30,7 +30,7 @@ describe "Time#succ" do context "zone is a timezone object" do it "preserves time zone" do zone = TimeSpecs::Timezone.new(offset: (5*3600+30*60)) - time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 60*60 + time = Time.new(2012, 1, 1, 12, 0, 0, zone) - 1 time.zone.should == zone end |