summaryrefslogtreecommitdiff
path: root/spec/ruby/core/time/usec_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/time/usec_spec.rb')
-rw-r--r--spec/ruby/core/time/usec_spec.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/core/time/usec_spec.rb b/spec/ruby/core/time/usec_spec.rb
index 018253ec77..6ea52f5e79 100644
--- a/spec/ruby/core/time/usec_spec.rb
+++ b/spec/ruby/core/time/usec_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "Time#usec" do
it "returns 0 for a Time constructed with a whole number of seconds" do
@@ -36,4 +36,8 @@ describe "Time#usec" do
it "returns the microseconds for time created by Time#local" do
Time.local(1,2,3,4,5,Rational(6.78)).usec.should == 780000
end
+
+ it "returns a positive value for dates before the epoch" do
+ Time.utc(1969, 11, 12, 13, 18, 57, 404240).usec.should == 404240
+ end
end