aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/time/shared/isdst.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/shared/isdst.rb')
-rw-r--r--spec/ruby/core/time/shared/isdst.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/core/time/shared/isdst.rb b/spec/ruby/core/time/shared/isdst.rb
new file mode 100644
index 0000000000..bc6d139230
--- /dev/null
+++ b/spec/ruby/core/time/shared/isdst.rb
@@ -0,0 +1,8 @@
+describe :time_isdst, shared: true do
+ it "dst? returns whether time is during daylight saving time" do
+ with_timezone("America/Los_Angeles") do
+ Time.local(2007, 9, 9, 0, 0, 0).send(@method).should == true
+ Time.local(2007, 1, 9, 0, 0, 0).send(@method).should == false
+ end
+ end
+end