spec/unit/configuration/distributed_index_spec.rb in riddle-1.4.0 vs spec/unit/configuration/distributed_index_spec.rb in riddle-1.5.0

- old
+ new

@@ -1,47 +1,47 @@ require 'spec_helper' describe Riddle::Configuration::DistributedIndex do - it "should not be valid without any indexes" do + it "should not be valid without any indices" do index = Riddle::Configuration::DistributedIndex.new("dist1") index.should_not be_valid end - - it "should be valid with just local indexes" do + + it "should be valid with just local indices" do index = Riddle::Configuration::DistributedIndex.new("dist1") - index.local_indexes << "local_one" + index.local_indices << "local_one" index.should be_valid end - - it "should be valid with just remote indexes" do + + it "should be valid with just remote indices" do index = Riddle::Configuration::DistributedIndex.new("dist1") - index.remote_indexes << Riddle::Configuration::RemoteIndex.new("local", 3312, "remote_one") + index.remote_indices << Riddle::Configuration::RemoteIndex.new("local", 3312, "remote_one") index.should be_valid end - + it "should be of type 'distributed'" do index = Riddle::Configuration::DistributedIndex.new("dist1") index.type.should == 'distributed' end - + it "should raise a ConfigurationError if rendering when not valid" do index = Riddle::Configuration::DistributedIndex.new("dist1") lambda { index.render }.should raise_error(Riddle::Configuration::ConfigurationError) end - + it "should render correctly if supplied settings are valid" do index = Riddle::Configuration::DistributedIndex.new("dist1") - - index.local_indexes << "test1" << "test1stemmed" - index.remote_indexes << + + index.local_indices << "test1" << "test1stemmed" + index.remote_indices << Riddle::Configuration::RemoteIndex.new("localhost", 3313, "remote1") << Riddle::Configuration::RemoteIndex.new("localhost", 3314, "remote2") << Riddle::Configuration::RemoteIndex.new("localhost", 3314, "remote3") index.agent_blackhole << "testbox:3312:testindex1,testindex2" - + index.agent_connect_timeout = 1000 index.agent_query_timeout = 3000 - + index.render.should == <<-DISTINDEX index dist1 { type = distributed local = test1 \ No newline at end of file