diff options
| author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-17 02:35:02 +0800 | 
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-17 02:39:26 +0800 | 
| commit | 79d9e0f15522c981fcd1005cec9d441ff96725f5 (patch) | |
| tree | 92b0cad85c52f072033918ec831235e81a67d2c1 | |
| parent | 114fa4d43121cd05fc18a8449a4d1abd92978a72 (diff) | |
| download | rails-79d9e0f15522c981fcd1005cec9d441ff96725f5.tar.gz rails-79d9e0f15522c981fcd1005cec9d441ff96725f5.tar.bz2 rails-79d9e0f15522c981fcd1005cec9d441ff96725f5.zip  | |
Makes this test don't trust on the speed of execution
| -rw-r--r-- | activerecord/test/cases/persistence_test.rb | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index fbfdd7b041..4ea5df0945 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -253,14 +253,15 @@ class PersistencesTest < ActiveRecord::TestCase    def test_update_attribute_for_udpated_at_on      developer = Developer.find(1) -    updated_at = developer.updated_at +    prev_month = Time.now.prev_month +    developer.update_attribute(:updated_at, prev_month) +    assert_equal prev_month, developer.updated_at      developer.update_attribute(:salary, 80001) -    assert_not_equal updated_at, developer.updated_at +    assert_not_equal prev_month, developer.updated_at      developer.reload -    assert_not_equal updated_at, developer.updated_at +    assert_not_equal prev_month, developer.updated_at    end -    def test_update_attributes      topic = Topic.find(1)      assert !topic.approved?  | 
