aboutsummaryrefslogtreecommitdiffstats
path: root/spec/ruby/core/time/shared/getgm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/shared/getgm.rb')
-rw-r--r--spec/ruby/core/time/shared/getgm.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/core/time/shared/getgm.rb b/spec/ruby/core/time/shared/getgm.rb
new file mode 100644
index 0000000000..3576365772
--- /dev/null
+++ b/spec/ruby/core/time/shared/getgm.rb
@@ -0,0 +1,9 @@
+describe :time_getgm, shared: true do
+ it "returns a new time which is the utc representation of time" do
+ # Testing with America/Regina here because it doesn't have DST.
+ with_timezone("CST", -6) do
+ t = Time.local(2007, 1, 9, 6, 0, 0)
+ t.send(@method).should == Time.gm(2007, 1, 9, 12, 0, 0)
+ end
+ end
+end