(Using Eclipse)
I have been chasing an issue round for a few hours now around one of my unit tests.
If within test/fixtures I have a file foos.yml
It always creates an item with the correct time, but a date of 01/01/2000 which makes sense as all I want is the time.
In my unit test though, if I write
then openingTime has a value of 15/10/2009 09:29:00
so how do I force my yml file to use todays date, as if I use a > on the 2 dates, it is taking into account the date portion as well.
i.e. although 9.29 is < 9.30, it returns true as 2000 is before 2009
I have been chasing an issue round for a few hours now around one of my unit tests.
If within test/fixtures I have a file foos.yml
Code:
shop:
openingTIme: <%= Time.utc(2009,"Oct",15,09,30,00).to_s(:db) %>
It always creates an item with the correct time, but a date of 01/01/2000 which makes sense as all I want is the time.
In my unit test though, if I write
Code:
openingTime = (2009,"Oct",15,09,29,00)
then openingTime has a value of 15/10/2009 09:29:00
so how do I force my yml file to use todays date, as if I use a > on the 2 dates, it is taking into account the date portion as well.
i.e. although 9.29 is < 9.30, it returns true as 2000 is before 2009