Skip to content

Commit

Permalink
Remove ExperimentalFeatures spec helper
Browse files Browse the repository at this point in the history
This file doesn't have a purpose after we support setting experimental
features directly on `Client`.
  • Loading branch information
ellnix committed Jan 11, 2025
1 parent 5159735 commit 72b6a06
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 38 deletions.
4 changes: 2 additions & 2 deletions spec/meilisearch/index/documents_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
end

it 'allows the user to store vectors' do
enable_vector_store(true)
client.update_experimental_features(vector_store: true)
new_doc = { objectId: 123, _vectors: { default: [0.1, 0.2, 0.3] } }
client.create_index('vector_test').await
new_index = client.index('vector_test')
Expand Down Expand Up @@ -397,7 +397,7 @@
end

it 'updates documents by function' do
enable_edit_documents_by_function(true)
client.update_experimental_features(edit_documents_by_function: true)
expect(index.document(1344)).to include('title' => 'The Hobbit')
expect(index.document(456)).to include('title' => 'Le Petit Prince')

Expand Down
2 changes: 1 addition & 1 deletion spec/meilisearch/index/search/similar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end

it 'does a search for similar documents' do
enable_vector_store(true)
client.update_experimental_features(vector_store: true)

documents = [
{
Expand Down
2 changes: 1 addition & 1 deletion spec/meilisearch/index/search/vector_search_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe 'Meilisearch::Index - Vector search' do
it 'does a basic search' do
enable_vector_store(true)
client.update_experimental_features(vector_store: true)

documents = [
{ objectId: 0, _vectors: { custom: [0, 0.8, -0.2] }, title: 'Across The Universe' },
Expand Down
6 changes: 4 additions & 2 deletions spec/meilisearch/index/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -870,8 +870,10 @@
let(:index) { client.index(uid) }
let(:default_embedders) { nil }

before { client.create_index(uid).await }
before { enable_vector_store(true) }
before do
client.create_index(uid).await
client.update_experimental_features(vector_store: true)
end

it '#embedders gets default value' do
expect(index.embedders).to eq(default_embedders)
Expand Down
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,5 +154,4 @@
config.include IndexesHelpers
config.include ExceptionsHelpers
config.include KeysHelpers
config.include ExperimentalFeatureHelpers
end
31 changes: 0 additions & 31 deletions spec/support/experimental_feature_helpers.rb

This file was deleted.

0 comments on commit 72b6a06

Please sign in to comment.