This project is archived and is in readonly mode.

#6636 new
vo.x

activerecord-3.0.5/test/cases/timestamp_test.rb fails.

Reported by vo.x | March 28th, 2011 @ 01:02 PM

I have got following error when running activerecord test suite ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux]

1) Failure: test_saving_a_unchanged_record_doesnt_update_its_timestamp(TimestampTest)

[/builddir/build/BUILD/rubygem-activerecord-3.0.5/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.5/test/cases/timestamp_test.rb:29:in `test_saving_a_unchanged_record_doesnt_update_its_timestamp'
 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/testing/setup_and_teardown.rb:67:in `__send__'
 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/testing/setup_and_teardown.rb:67:in `run'
 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/callbacks.rb:418:in `_run_setup_callbacks'
 /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.5/lib/active_support/testing/setup_and_teardown.rb:65:in `run']:

expected but was
.

I have added some debug output to the test:

p @previously_updated_at.to_f
p @developer.updated_at.to_f

and it outputs:

1301313170.0
1301313170.6389

So apparently, the timestamps are different. Either test or better the save internals should be fixed IMO.

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages