mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
little spec house cleaning
This commit is contained in:
parent
49cd69e565
commit
2f162ca500
@ -86,14 +86,14 @@ describe ValidatesTimeliness::AttributeMethods do
|
||||
@person.birth_date_and_time.strftime('%Y-%m-%d %H:%M:%S %Z %z').should == time_string + ' EST +1000'
|
||||
end
|
||||
|
||||
it "should return true for attribute changed?" do
|
||||
time_string = "2000-01-01 02:03:04"
|
||||
@person.birth_date_and_time = time_string
|
||||
@person.birth_date_and_time_changed?.should be_true
|
||||
end
|
||||
|
||||
describe "dirty attributes" do
|
||||
|
||||
it "should return true for attribute changed? when value updated" do
|
||||
time_string = "2000-01-01 02:03:04"
|
||||
@person.birth_date_and_time = time_string
|
||||
@person.birth_date_and_time_changed?.should be_true
|
||||
end
|
||||
|
||||
it "should show changes when time attribute changed from nil to Time object" do
|
||||
time_string = "2000-01-01 02:03:04"
|
||||
@person.birth_date_and_time = time_string
|
||||
|
||||
Loading…
Reference in New Issue
Block a user