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

Commit 5987061

Browse files
committed
Fix spec for old ruby
1 parent da30909 commit 5987061

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/integration_spec.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def self.table_name_prefix
221221
class Namespaced::Model < ActiveRecord::Base
222222
include AlgoliaSearch
223223

224-
algoliasearch :synchronous => true do
224+
algoliasearch :synchronous => true, :index_name => safe_index_name(algolia_index_name({})) do
225225
attribute :customAttr do
226226
40 + another_private_value
227227
end
@@ -637,18 +637,18 @@ class SerializedObject < ActiveRecord::Base
637637
end
638638

639639
it "should have an index name without :: hierarchy" do
640-
Namespaced::Model.index_name.should == "Namespaced_Model"
640+
(Namespaced::Model.index_name.end_with?("Namespaced_Model")).should == true
641641
end
642642

643643
it "should use the block to determine attribute's value" do
644-
m = Namespaced::Model.new(another_private_value: 2)
644+
m = Namespaced::Model.new(:another_private_value => 2)
645645
attributes = Namespaced::Model.algoliasearch_settings.get_attributes(m)
646646
attributes['customAttr'].should == 42
647647
attributes['myid'].should == m.id
648648
end
649649

650650
it "should always update when there is no custom _changed? function" do
651-
m = Namespaced::Model.create!(another_private_value: 2)
651+
m = Namespaced::Model.create!(:another_private_value => 2)
652652
results = Namespaced::Model.search(42)
653653
expect(results.size).to eq(1)
654654
expect(results[0].id).to eq(m.id)

0 commit comments

Comments
 (0)