summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/to_a_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/to_a_spec.rb')
-rw-r--r--spec/ruby/core/time/to_a_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/core/time/to_a_spec.rb b/spec/ruby/core/time/to_a_spec.rb
new file mode 100644
index 0000000000..a4c4a8fbc9
--- /dev/null
+++ b/spec/ruby/core/time/to_a_spec.rb
@@ -0,0 +1,12 @@
+require File.expand_path('../../../spec_helper', __FILE__)
+
+describe "Time#to_a" do
+ platform_is_not :windows do
+ it "returns a 10 element array representing the deconstructed time" do
+ # Testing with America/Regina here because it doesn't have DST.
+ with_timezone("America/Regina") do
+ Time.at(0).to_a.should == [0, 0, 18, 31, 12, 1969, 3, 365, false, "CST"]
+ end
+ end
+ end
+end