spec/integration/yokozuna/index_spec.rb in riak-client-2.0.0 vs spec/integration/yokozuna/index_spec.rb in riak-client-2.1.0

- old
+ new

@@ -8,31 +8,31 @@ @index = 'yz_spec-' + random_key @schema = 'yz_spec-' + random_key end context "without any indexes" do - it "should allow index creation" do + it "allows index creation" do expect(@client.create_search_index(@index, "_yz_default", 3)).to eq(true) end end context "with an index" do before :all do expect(@client.create_search_index(@index)).to eq(true) wait_until{ !@client.get_search_index(@index).nil? } end - it "should allow index inspection" do + it "allows index inspection" do expect(@client.get_search_index(@index).name).to eq(@index) expect{ @client.get_search_index("herp_derp") }.to raise_error(Riak::ProtobuffsFailedRequest) end - it "should have an index list" do + it "has an index list" do expect(@client.list_search_indexes.size).to be >= 1 end - it "should associate a bucket with an index" do + it "associates a bucket with an index" do @bucket = Riak::Bucket.new(@client, @index) @bucket.props = {'search_index' => @index} @bucket = @client.bucket(@index) expect(@bucket.props).to include('search_index' => @index) end @@ -43,10 +43,10 @@ @bucket.props = {'search_index' => @index} @bucket = @client.bucket(@index) expect(@bucket.props).to include('search_index' => @index) end - it "should index on object writes" do + it "indexes on object writes" do object = @bucket.get_or_new("cat") object.raw_data = {"cat_s"=>"Lela"}.to_json object.content_type = 'application/json' object.store sleep 1.1 # pause for index commit to trigger