diff --git a/src/spec/dsl.cr b/src/spec/dsl.cr index d534987c6d90..bddc8c5f7b1a 100644 --- a/src/spec/dsl.cr +++ b/src/spec/dsl.cr @@ -270,7 +270,7 @@ module Spec private def self.print_list_tags(tag_counts : Hash(String, Int32)) : Nil return if tag_counts.empty? longest_name_size = tag_counts.keys.max_of(&.size) - tag_counts.to_a.sort_by! { |k, v| -v }.each do |tag_name, count| + tag_counts.to_a.sort_by! { |k, v| {-v, k} }.each do |tag_name, count| puts "#{tag_name.rjust(longest_name_size)}: #{count}" end end