Skip to content

Commit 62da6d3

Browse files
committed
Improved test code
1 parent 78627a1 commit 62da6d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/sequel_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,15 +155,15 @@ def test_instance_sparsevec_euclidean
155155

156156
def test_model_nil
157157
create_items
158-
assert_equal 0, Item.nearest_neighbors(:embedding, nil, distance: "euclidean").first(5).count
158+
assert_empty Item.nearest_neighbors(:embedding, nil, distance: "euclidean").first(5)
159159
end
160160

161161
def test_instance_nil
162162
create_items
163163
item = Item.create(id: 4, embedding: nil)
164164
item.refresh
165165
assert_nil item.embedding
166-
assert_equal 0, item.nearest_neighbors(:embedding, distance: "euclidean").first(5).count
166+
assert_empty item.nearest_neighbors(:embedding, distance: "euclidean").first(5)
167167
end
168168

169169
def test_model_dataset

0 commit comments

Comments
 (0)