diff options
Diffstat (limited to 'spec/ruby/core/time')
-rw-r--r-- | spec/ruby/core/time/ceil_spec.rb | 7 | ||||
-rw-r--r-- | spec/ruby/core/time/floor_spec.rb | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/spec/ruby/core/time/ceil_spec.rb b/spec/ruby/core/time/ceil_spec.rb index 29dcec5d72..86029554db 100644 --- a/spec/ruby/core/time/ceil_spec.rb +++ b/spec/ruby/core/time/ceil_spec.rb @@ -36,10 +36,11 @@ ruby_version_is "2.7" do it "copies own timezone to the returning value" do @time.zone.should == @time.ceil.zone - with_timezone "JST-9" do - time = Time.at 0, 1 - time.zone.should == time.ceil.zone + time = with_timezone "JST-9" do + Time.at 0, 1 end + + time.zone.should == time.ceil.zone end end end diff --git a/spec/ruby/core/time/floor_spec.rb b/spec/ruby/core/time/floor_spec.rb index 763ed1ba51..a19585b787 100644 --- a/spec/ruby/core/time/floor_spec.rb +++ b/spec/ruby/core/time/floor_spec.rb @@ -28,10 +28,11 @@ ruby_version_is "2.7" do it "copies own timezone to the returning value" do @time.zone.should == @time.floor.zone - with_timezone "JST-9" do - time = Time.at 0, 1 - time.zone.should == time.floor.zone + time = with_timezone "JST-9" do + Time.at 0, 1 end + + time.zone.should == time.floor.zone end end end |