mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
fix dummy date part in Validator.type_cast_value
removed all core extensions
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
||||
|
||||
describe ValidatesTimeliness::CoreExtensions::Date do
|
||||
before do
|
||||
@a_date = Date.new(2008, 7, 1)
|
||||
end
|
||||
|
||||
it "should make a date value into a dummy time value" do
|
||||
@a_date.to_dummy_time.should == Time.utc(2000,1,1,0,0,0)
|
||||
end
|
||||
end
|
||||
|
||||
describe ValidatesTimeliness::CoreExtensions::Time do
|
||||
before do
|
||||
@a_time = Time.mktime(2008, 7, 1, 2, 3, 4)
|
||||
end
|
||||
|
||||
it "should make a time value into a dummy time value" do
|
||||
@a_time.to_dummy_time.should == Time.utc(2000,1,1,2,3,4)
|
||||
end
|
||||
end
|
||||
|
||||
describe ValidatesTimeliness::CoreExtensions::DateTime do
|
||||
before do
|
||||
@a_datetime = DateTime.new(2008, 7, 1, 2, 3, 4)
|
||||
end
|
||||
|
||||
it "should make a datetime value into a dummy time value" do
|
||||
@a_datetime.to_dummy_time.should == Time.utc(2000,1,1,2,3,4)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user