Skip to content

Commit

Permalink
Reorder assertions
Browse files Browse the repository at this point in the history
Prefer this order. The first assertion is a precondition. Once we
know the precondition holds, then it makes sense to ensure const_set
was invoked only once.
  • Loading branch information
fxn authored and shioyama committed Jun 3, 2023
1 parent bd9fbc7 commit 1ec9239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/lib/im/test_autovivification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def loader_admin.const_set(cname, mod)

concurrent_autovivifications.each(&:join)

assert_equal 1, $test_admin_const_set_calls
assert $test_admin_const_set_queue.empty?
assert_equal 1, $test_admin_const_set_calls
end
end

Expand Down

0 comments on commit 1ec9239

Please sign in to comment.