diff options
Diffstat (limited to 'spec/ruby/core/time/getutc_spec.rb')
| -rw-r--r-- | spec/ruby/core/time/getutc_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/ruby/core/time/getutc_spec.rb b/spec/ruby/core/time/getutc_spec.rb index a6e74cfb98..1d49059a71 100644 --- a/spec/ruby/core/time/getutc_spec.rb +++ b/spec/ruby/core/time/getutc_spec.rb @@ -1,6 +1,11 @@ -require File.expand_path('../../../spec_helper', __FILE__) -require File.expand_path('../shared/getgm', __FILE__) +require_relative '../../spec_helper' 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 |
