require 'spec_helper' require 'riak' describe "Yokozuna", test_client: true, integration: true do before(:all) do @client = test_client @index = 'yz_spec-' + random_key @schema = 'yz_spec-' + random_key end context 'with no schema' do it 'allows schema creation' do @client.create_search_schema(@schema, SCHEMA_CONTENT) wait_until{ !@client.get_search_schema(@schema).nil? } expect(@client.get_search_schema(@schema)).not_to be_nil end end context 'with a schema' do it 'has a readable schema' do @client.create_search_schema(@schema, SCHEMA_CONTENT) wait_until{ !@client.get_search_schema(@schema).nil? } schema_resp = @client.get_search_schema(@schema) expect(schema_resp.name).to eq(@schema) expect(schema_resp.content).to eq(SCHEMA_CONTENT) end end SCHEMA_CONTENT = <<-XML _yz_id XML end