Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 1485e46

Browse files
committed
fix tests
1 parent cd3fd8a commit 1485e46

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

lib/inferred_concepts/manager.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def deduplicate_concepts_by_letter(per_letter_batch: 50, full_pass_batch: 150)
7070

7171
# Apply the deduplicated concepts
7272
InferredConcept.where.not(name: final_result).destroy_all
73-
InferredConcept.insert_all(final_result.map { { name: it } })
73+
InferredConcept.insert_all(final_result.map { |concept| { name: concept } })
7474
end
7575
end
7676

spec/lib/personas/concept_deduplicator_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@
5555
it "defines correct response format" do
5656
format = persona.response_format
5757

58-
expect(format).to eq([{ "key" => "streamlined_tags", "type" => "array" }])
58+
expect(format).to eq(
59+
[{ "array_type" => "string", "key" => "streamlined_tags", "type" => "array" }],
60+
)
5961
end
6062
end
6163

spec/lib/personas/concept_finder_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@
7272
it "defines correct response format" do
7373
format = persona.response_format
7474

75-
expect(format).to eq(
76-
[{ "key" => "concepts", "type" => "array", "items" => { "type" => "string" } }],
77-
)
75+
expect(format).to eq([{ "array_type" => "string", "key" => "concepts", "type" => "array" }])
7876
end
7977
end
8078

spec/lib/personas/concept_matcher_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@
5656
it "defines correct response format" do
5757
format = persona.response_format
5858

59-
expect(format).to eq([{ "key" => "matching_concepts", "type" => "array" }])
59+
expect(format).to eq(
60+
[{ "array_type" => "string", "key" => "matching_concepts", "type" => "array" }],
61+
)
6062
end
6163
end
6264

0 commit comments

Comments
 (0)