aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-19 13:00:12 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-19 13:00:12 +0000
commitda25f9b3e57a0cdf35a15b6b6ad26ccf038e416b (patch)
tree7caa181084d7879e8d650f7e0818641cfe900b4d /spec
parent773174d810d5a9bb968befe8cf44fb7d75c83500 (diff)
downloadruby-da25f9b3e57a0cdf35a15b6b6ad26ccf038e416b.tar.gz
Adapt Time#zone spec to deal with differences of TZ validation on Windows
* [Bug #13591] [ruby-core:81347] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59113 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r--spec/rubyspec/core/time/zone_spec.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/spec/rubyspec/core/time/zone_spec.rb b/spec/rubyspec/core/time/zone_spec.rb
index 407841db3d..9c7acd66e3 100644
--- a/spec/rubyspec/core/time/zone_spec.rb
+++ b/spec/rubyspec/core/time/zone_spec.rb
@@ -62,7 +62,7 @@ describe "Time#zone" do
Time.now.utc.zone.should == "UTC"
end
- platform_is_not :aix do
+ platform_is_not :aix, :windows do
it "defaults to UTC when bad zones given" do
with_timezone("hello-foo") do
Time.now.utc_offset.should == 0
@@ -75,4 +75,16 @@ describe "Time#zone" do
end
end
end
+
+ platform_is :windows do
+ # See https://bugs.ruby-lang.org/issues/13591#note-11
+ it "defaults to UTC when bad zones given" do
+ with_timezone("1,2") do
+ Time.now.utc_offset.should == 0
+ end
+ with_timezone("12") do
+ Time.now.utc_offset.should == 0
+ end
+ end
+ end
end