diff options
Diffstat (limited to 'spec/ruby/library/datetime/now_spec.rb')
| -rw-r--r-- | spec/ruby/library/datetime/now_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/ruby/library/datetime/now_spec.rb b/spec/ruby/library/datetime/now_spec.rb index a5bf590aff..5c0411c2be 100644 --- a/spec/ruby/library/datetime/now_spec.rb +++ b/spec/ruby/library/datetime/now_spec.rb @@ -1,19 +1,19 @@ -require File.expand_path('../../../spec_helper', __FILE__) +require_relative '../../spec_helper' require 'date' describe "DateTime.now" do it "creates an instance of DateTime" do - DateTime.now.should be_an_instance_of(DateTime) + DateTime.now.should.instance_of?(DateTime) end it "sets the current date" do - (DateTime.now - Date.today).to_f.should be_close(0.0, 1.0) + (DateTime.now - Date.today).to_f.should be_close(0.0, TIME_TOLERANCE) end it "sets the current time" do dt = DateTime.now now = Time.now - (dt.to_time - now).should be_close(0.0, 10.0) + (dt.to_time - now).should be_close(0.0, TIME_TOLERANCE) end it "grabs the local timezone" do |
