mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
renamed module DateHelper to InstanceTag
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
#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
|
||||
18
spec/instance_tag_spec.rb
Normal file
18
spec/instance_tag_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require File.dirname(__FILE__) + '/spec_helper'
|
||||
|
||||
describe ValidatesTimeliness::InstanceTag, :type => :helper do
|
||||
|
||||
before do
|
||||
@person = Person.new
|
||||
end
|
||||
|
||||
it "should return struct for time string" do
|
||||
@person.birth_date_and_time = "2008-02-30 12:00:00"
|
||||
output = date_select(:person, :birth_date_and_time, :include_blank => true)
|
||||
puts output
|
||||
output.should have_tag('select') do
|
||||
with_tag('input[type=text]', 3)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user