Skip to content

Commit afb53ae

Browse files
committed
[GEM] Adds spec_helper
1 parent 59fa53e commit afb53ae

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

elasticsearch/spec/integration/client_integration_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
ELASTICSEARCH_URL = ENV['TEST_ES_SERVER'] || "http://localhost:#{(ENV['PORT'] || 9200)}"
1818
raise URI::InvalidURIError unless ELASTICSEARCH_URL =~ /\A#{URI::DEFAULT_PARSER.make_regexp}\z/
1919

20-
require 'elasticsearch'
20+
require 'spec_helper'
2121
require 'logger'
22-
require 'rspec'
2322

2423
context 'Elasticsearch client' do
2524
let(:logger) { Logger.new($stderr) }

elasticsearch/spec/spec_helper.rb

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Licensed to Elasticsearch B.V. under one or more contributor
2+
# license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright
4+
# ownership. Elasticsearch B.V. licenses this file to you under
5+
# the Apache License, Version 2.0 (the "License"); you may
6+
# not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
require 'elasticsearch'
19+
require 'rspec'
20+
21+
RSpec.configure do |config|
22+
config.formatter = :documentation
23+
end

elasticsearch/spec/unit/cloud_credentials_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
1718
require 'spec_helper'
1819

1920
describe Elasticsearch::Client do

elasticsearch/spec/unit/wrapper_gem_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
1718
require 'spec_helper'
1819

1920
describe 'Elasticsearch: wrapper gem' do

0 commit comments

Comments
 (0)