mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
fix validator spec
This commit is contained in:
parent
c97050f62f
commit
728439201d
@ -35,7 +35,7 @@ describe ValidatesTimeliness::Validator do
|
||||
Person.validates_date :birth_date, :allow_nil => true
|
||||
record = Person.new
|
||||
record.stub!(:birth_date).and_return(nil)
|
||||
record.stub!(:birth_date_before_type_cast).and_return("Not a date")
|
||||
record.stub!(:_timeliness_raw_value_for).and_return("Not a date")
|
||||
record.should_not be_valid
|
||||
record.errors[:birth_date].first.should == 'is not a valid date'
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user