Permalink
Browse files

add spec for Time#utc_offset for Rational offsets

  • Loading branch information...
1 parent 62d48b1 commit 3f87515f5e7691108b05c13ad3077d8895cb73b6 @dubek dubek committed May 9, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 spec/ruby/core/time/shared/gmt_offset.rb
@@ -25,4 +25,11 @@
Time.local(2010,4,4,3,0,0).send(@method).should == 12*60*60
end
end
+
+ ruby_version_is "1.9" do
+ it "returns offset as Rational" do
+ Time.new(2010,4,4,1,59,59,7245).send(@method).should == 7245
+ Time.new(2010,4,4,1,59,59,7245.5).send(@method).should == Rational(14491,2)
+ end
+ end
end

0 comments on commit 3f87515

Please sign in to comment.