mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
changed version check to Rails constant as AR VERSION not loaded by
default changed time component validation to use dummy date parts to avoid pre epoch issues
This commit is contained in:
11
spec/date_helper_spec.rb
Normal file
11
spec/date_helper_spec.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
#require File.dirname(__FILE__) + '/spec_helper'
|
||||
|
||||
#describe ValidatesTimeliness::DateHelper::InstanceTag do
|
||||
|
||||
# it "should return struct for time string" do
|
||||
# object = mock("Model", :birth_date_and_time_before_type_cast => "2008-01-01 12:00:00")
|
||||
# struct = value_with_timeliness(object)
|
||||
# struct.should be_kind_of(DateTimeStruct)
|
||||
# end
|
||||
|
||||
#end
|
||||
@@ -9,13 +9,13 @@ if File.exists?(File.dirname(__FILE__) + '/../../../../vendor/rails')
|
||||
require 'activerecord/lib/active_record'
|
||||
require 'railties/lib/rails/version'
|
||||
|
||||
puts "Using vendored ActiveRecord version #{ActiveRecord::VERSION::STRING}"
|
||||
puts "Using vendored Rails version #{Rails::VERSION::STRING}"
|
||||
else
|
||||
require 'active_record'
|
||||
require 'active_record/version'
|
||||
require 'rails/version'
|
||||
|
||||
puts "Using gem ActiveRecord version #{ActiveRecord::VERSION::STRING}"
|
||||
puts "Using gem Rails version #{Rails::VERSION::STRING}"
|
||||
end
|
||||
|
||||
require 'validates_timeliness'
|
||||
|
||||
Reference in New Issue
Block a user