I have the following test:
it 'gives the correct last parsed result' do
expect(FactoryGirl.create(:category_page_with_parsed_results).last_parsed_result.date).to eql(Date.parse('2012-01-01'))
end
And it fails like this:
expected: Sun, 01 Jan 2012
got: Sun, 01 Jan 2012 00:00:00 UTC +00:00
The thing here is that when I create that Factory, I don't write any 00:00:00 time at all, so I don't know why is it returning it that way.
Any thoughts on how should I test this?
last_parsed_resultis intimestamp, to be specific what is its class ?ActiveSupport::TimeWithZone