提交 47cce917 编写于 作者: F Francesco Rodriguez

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.
上级 ea84b0c6
......@@ -114,6 +114,8 @@ def test_nil_return_from_converter_is_respected_when_allow_nil_is_true
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册