summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/getutc_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/getutc_spec.rb')
-rw-r--r--spec/ruby/core/time/getutc_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/ruby/core/time/getutc_spec.rb b/spec/ruby/core/time/getutc_spec.rb
index 0cd9c17b00..1d49059a71 100644
--- a/spec/ruby/core/time/getutc_spec.rb
+++ b/spec/ruby/core/time/getutc_spec.rb
@@ -1,6 +1,11 @@
require_relative '../../spec_helper'
-require_relative 'shared/getgm'
describe "Time#getutc" do
- it_behaves_like :time_getgm, :getutc
+ 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.getutc.should == Time.gm(2007, 1, 9, 12, 0, 0)
+ end
+ end
end