Drop the sort in Contacts.all
Assisted-by: GLM-5.3 via pi
change oyykqzywvmznnrsvmmznowwsxkwqptou
commit ab49f15af6b8a472012b1f024c917844e6ce15eb
author Alpha Chen <alpha@kejadlen.dev>
date
parent uxwwwqos
diff --git a/lib/pro_tacts/contacts.rb b/lib/pro_tacts/contacts.rb
index 43efc70..6f85def 100644
--- a/lib/pro_tacts/contacts.rb
+++ b/lib/pro_tacts/contacts.rb
@@ -25,7 +25,7 @@ module ProTacts
     end
 
     def all
-      directory.glob("*.kdl").sort.map { load(it) }.compact
+      directory.glob("*.kdl").map { load(it) }.compact
     end
 
     def find(id)
diff --git a/test/pro_tacts/test_contacts.rb b/test/pro_tacts/test_contacts.rb
index ab32c9e..83b0923 100644
--- a/test/pro_tacts/test_contacts.rb
+++ b/test/pro_tacts/test_contacts.rb
@@ -13,12 +13,15 @@ class ContactsTest < Minitest::Test
     end
   end
 
-  def test_all_lists_contacts_sorted_by_id
+  def test_all_lists_every_contact
     with_contacts({
       "znorth.kdl" => "contact { name \"Zed\" }",
       "aiden.kdl" => "contact { name \"Aiden\" }",
     }) do |contacts|
-      assert_equal %w[aiden znorth], contacts.all.map { it.id }
+      ids = contacts.all.map { it.id }
+
+      assert_includes ids, "aiden"
+      assert_includes ids, "znorth"
     end
   end