changed rails version detection to be tighter to avoid rails RC problem

added rspec on rails validate_timeliness_of matcher
This commit is contained in:
Adam Meehan
2008-05-15 11:00:07 +10:00
parent 10856b32d0
commit c6312329ec
4 changed files with 94 additions and 6 deletions

View File

@@ -22,7 +22,7 @@ describe ValidatesTimeliness::AttributeMethods do
@person.birth_date_and_time.should be_kind_of(Time)
end
unless Rails::VERSION::STRING < '2.1'
unless Rails::VERSION::STRING <= '2.0.2'
it "should return stored time string as Time with correct timezone" do
Time.zone = TimeZone['Sydney'] # no I'm not from Sydney but there is no Melbourne timezone!
@person.birth_date_and_time = "1980-12-25 01:02:03"