Skip to content

Commit 74ece83

Browse files
committed
fix standardrb errors
1 parent 6914d96 commit 74ece83

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

spec/weaviate/schema_spec.rb

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
end
103103
end
104104

105-
context "named vector config" do
105+
context "named vector config" do
106106
before do
107107
@captured_request = nil
108108
allow_any_instance_of(Faraday::Connection).to receive(:post) do |_, path, &block|
@@ -116,41 +116,39 @@
116116

117117
it "sets up named vector config" do
118118
schema.create(
119-
class_name: 'ArticleNV',
120-
description: 'Articles with named vectors',
119+
class_name: "ArticleNV",
120+
description: "Articles with named vectors",
121121
properties: [
122122
{
123-
"dataType": ["text"],
124-
"name": "title"
123+
dataType: ["text"],
124+
name: "title"
125125
},
126126
{
127-
"dataType": ["text"],
128-
"name": "body"
127+
dataType: ["text"],
128+
name: "body"
129129
}
130130
],
131131
vector_config: {
132-
"title": {
133-
"vectorizer": {
132+
title: {
133+
vectorizer: {
134134
"text2vec-openai": {
135-
"properties": ["title"]
135+
properties: ["title"]
136136
}
137137
},
138-
"vectorIndexType": "hnsw", # Adding vector index type
138+
vectorIndexType: "hnsw" # Adding vector index type
139139
},
140-
"body": {
141-
"vectorizer": {
140+
body: {
141+
vectorizer: {
142142
"text2vec-openai": {
143-
"properties": ["body"]
143+
properties: ["body"]
144144
}
145145
},
146-
"vectorIndexType": "hnsw", # Adding vector index type
146+
vectorIndexType: "hnsw" # Adding vector index type
147147
}
148148
}
149-
150149
)
151150

152-
expect(@captured_request.body["vectorConfig"]).to eq({:title=>{:vectorizer=>{:"text2vec-openai"=>{:properties=>["title"]}}, :vectorIndexType=>"hnsw"}, :body=>{:vectorizer=>{:"text2vec-openai"=>{:properties=>["body"]}}, :vectorIndexType=>"hnsw"}})
153-
151+
expect(@captured_request.body["vectorConfig"]).to eq({title: {vectorizer: {"text2vec-openai": {properties: ["title"]}}, vectorIndexType: "hnsw"}, body: {vectorizer: {"text2vec-openai": {properties: ["body"]}}, vectorIndexType: "hnsw"}})
154152
end
155153
end
156154
end

0 commit comments

Comments
 (0)