From 47cce917f266baa0c51bb259b8ad678c0422830d Mon Sep 17 00:00:00 2001 From: Francesco Rodriguez Date: Sun, 26 Aug 2012 16:32:08 -0500 Subject: fix order dependent test in AggregationsTest Ensure class variable is set to nil. It prevents the following test to fail: def test_do_not_run_the_converter_when_nil_was_set customers(:david).non_blank_gps_location = nil assert_nil Customer.gps_conversion_was_run end Check https://github.com/rails/rails/blob/master/activerecord/test/models/customer.rb#L7 for more information. --- activerecord/test/cases/aggregations_test.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/activerecord/test/cases/aggregations_test.rb b/activerecord/test/cases/aggregations_test.rb index 5bd8f76ba2..48b06a767f 100644 --- a/activerecord/test/cases/aggregations_test.rb +++ b/activerecord/test/cases/aggregations_test.rb @@ -114,6 +114,8 @@ class AggregationsTest < ActiveRecord::TestCase customers(:david).save customers(:david).reload assert_nil customers(:david).non_blank_gps_location + ensure + Customer.gps_conversion_was_run = nil end def test_nil_return_from_converter_results_in_failure_when_allow_nil_is_false -- cgit v1.2.3