mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-07 09:37:36 +08:00
21 lines
612 B
Ruby
21 lines
612 B
Ruby
# require File.expand_path('../../../spec_helper', __FILE__)
|
|
# require File.expand_path('../fixtures/methods', __FILE__)
|
|
# require File.expand_path('../shared/getgm', __FILE__)
|
|
|
|
# describe "Time#getutc" do
|
|
# it_behaves_like(:time_getgm, :getutc)
|
|
# end
|
|
describe "Time#getutc" do
|
|
before do
|
|
@method = :getutc
|
|
end
|
|
|
|
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
|