elasticsearch-model 7.1.2.pre → 7.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Rakefile +6 -4
  4. data/elasticsearch-model.gemspec +1 -2
  5. data/examples/activerecord_article.rb +1 -1
  6. data/examples/activerecord_associations.rb +2 -2
  7. data/examples/activerecord_custom_analyzer.rb +3 -3
  8. data/examples/activerecord_mapping_completion.rb +1 -1
  9. data/examples/activerecord_mapping_edge_ngram.rb +1 -1
  10. data/examples/couchbase_article.rb +1 -1
  11. data/examples/datamapper_article.rb +1 -1
  12. data/examples/mongoid_article.rb +1 -1
  13. data/examples/ohm_article.rb +1 -1
  14. data/examples/riak_article.rb +1 -1
  15. data/lib/elasticsearch/model.rb +3 -3
  16. data/lib/elasticsearch/model/adapter.rb +1 -1
  17. data/lib/elasticsearch/model/adapters/active_record.rb +1 -1
  18. data/lib/elasticsearch/model/adapters/default.rb +1 -1
  19. data/lib/elasticsearch/model/adapters/mongoid.rb +1 -1
  20. data/lib/elasticsearch/model/adapters/multiple.rb +1 -1
  21. data/lib/elasticsearch/model/callbacks.rb +1 -1
  22. data/lib/elasticsearch/model/client.rb +1 -6
  23. data/lib/elasticsearch/model/ext/active_record.rb +1 -1
  24. data/lib/elasticsearch/model/hash_wrapper.rb +1 -1
  25. data/lib/elasticsearch/model/importing.rb +1 -1
  26. data/lib/elasticsearch/model/indexing.rb +3 -3
  27. data/lib/elasticsearch/model/multimodel.rb +1 -1
  28. data/lib/elasticsearch/model/naming.rb +1 -1
  29. data/lib/elasticsearch/model/proxy.rb +1 -1
  30. data/lib/elasticsearch/model/response.rb +1 -1
  31. data/lib/elasticsearch/model/response/aggregations.rb +1 -1
  32. data/lib/elasticsearch/model/response/base.rb +1 -1
  33. data/lib/elasticsearch/model/response/pagination.rb +1 -1
  34. data/lib/elasticsearch/model/response/pagination/kaminari.rb +1 -1
  35. data/lib/elasticsearch/model/response/pagination/will_paginate.rb +1 -1
  36. data/lib/elasticsearch/model/response/records.rb +1 -1
  37. data/lib/elasticsearch/model/response/result.rb +1 -1
  38. data/lib/elasticsearch/model/response/results.rb +2 -1
  39. data/lib/elasticsearch/model/response/suggestions.rb +1 -1
  40. data/lib/elasticsearch/model/searching.rb +1 -1
  41. data/lib/elasticsearch/model/serializing.rb +1 -1
  42. data/lib/elasticsearch/model/version.rb +2 -2
  43. data/spec/elasticsearch/model/adapter_spec.rb +1 -1
  44. data/spec/elasticsearch/model/adapters/active_record/associations_spec.rb +1 -1
  45. data/spec/elasticsearch/model/adapters/active_record/basic_spec.rb +1 -1
  46. data/spec/elasticsearch/model/adapters/active_record/dynamic_index_name_spec.rb +1 -1
  47. data/spec/elasticsearch/model/adapters/active_record/import_spec.rb +1 -1
  48. data/spec/elasticsearch/model/adapters/active_record/multi_model_spec.rb +1 -1
  49. data/spec/elasticsearch/model/adapters/active_record/namespaced_model_spec.rb +1 -1
  50. data/spec/elasticsearch/model/adapters/active_record/pagination_spec.rb +1 -1
  51. data/spec/elasticsearch/model/adapters/active_record/parent_child_spec.rb +1 -1
  52. data/spec/elasticsearch/model/adapters/active_record/serialization_spec.rb +1 -1
  53. data/spec/elasticsearch/model/adapters/active_record_spec.rb +1 -1
  54. data/spec/elasticsearch/model/adapters/default_spec.rb +1 -1
  55. data/spec/elasticsearch/model/adapters/mongoid/basic_spec.rb +1 -1
  56. data/spec/elasticsearch/model/adapters/mongoid/multi_model_spec.rb +1 -1
  57. data/spec/elasticsearch/model/adapters/mongoid_spec.rb +1 -1
  58. data/spec/elasticsearch/model/adapters/multiple_spec.rb +1 -1
  59. data/spec/elasticsearch/model/callbacks_spec.rb +1 -1
  60. data/spec/elasticsearch/model/client_spec.rb +4 -4
  61. data/spec/elasticsearch/model/hash_wrapper_spec.rb +1 -1
  62. data/spec/elasticsearch/model/importing_spec.rb +1 -1
  63. data/spec/elasticsearch/model/indexing_spec.rb +17 -12
  64. data/spec/elasticsearch/model/module_spec.rb +2 -2
  65. data/spec/elasticsearch/model/multimodel_spec.rb +1 -1
  66. data/spec/elasticsearch/model/naming_spec.rb +1 -1
  67. data/spec/elasticsearch/model/proxy_spec.rb +1 -1
  68. data/spec/elasticsearch/model/response/aggregations_spec.rb +1 -1
  69. data/spec/elasticsearch/model/response/base_spec.rb +1 -1
  70. data/spec/elasticsearch/model/response/pagination/kaminari_spec.rb +1 -1
  71. data/spec/elasticsearch/model/response/pagination/will_paginate_spec.rb +1 -1
  72. data/spec/elasticsearch/model/response/records_spec.rb +1 -1
  73. data/spec/elasticsearch/model/response/response_spec.rb +1 -1
  74. data/spec/elasticsearch/model/response/result_spec.rb +1 -1
  75. data/spec/elasticsearch/model/response/results_spec.rb +13 -1
  76. data/spec/elasticsearch/model/searching_search_request_spec.rb +1 -1
  77. data/spec/elasticsearch/model/searching_spec.rb +1 -1
  78. data/spec/elasticsearch/model/serializing_spec.rb +1 -1
  79. data/spec/spec_helper.rb +1 -1
  80. data/spec/support/app.rb +2 -2
  81. data/spec/support/app/answer.rb +2 -2
  82. data/spec/support/app/article.rb +1 -1
  83. data/spec/support/app/article_for_pagination.rb +1 -1
  84. data/spec/support/app/article_no_type.rb +1 -1
  85. data/spec/support/app/article_with_custom_serialization.rb +1 -1
  86. data/spec/support/app/article_with_dynamic_index_name.rb +1 -1
  87. data/spec/support/app/author.rb +1 -1
  88. data/spec/support/app/authorship.rb +1 -1
  89. data/spec/support/app/category.rb +1 -1
  90. data/spec/support/app/comment.rb +1 -1
  91. data/spec/support/app/episode.rb +1 -1
  92. data/spec/support/app/image.rb +1 -1
  93. data/spec/support/app/import_article.rb +1 -1
  94. data/spec/support/app/mongoid_article.rb +1 -1
  95. data/spec/support/app/namespaced_book.rb +1 -1
  96. data/spec/support/app/parent_and_child_searchable.rb +1 -1
  97. data/spec/support/app/post.rb +1 -1
  98. data/spec/support/app/question.rb +1 -1
  99. data/spec/support/app/searchable.rb +1 -1
  100. data/spec/support/app/series.rb +1 -1
  101. metadata +5 -19
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -42,6 +42,7 @@ module Elasticsearch
42
42
  response.response['hits']['hits'].map { |hit| Result.new(hit) }
43
43
  end
44
44
 
45
+ alias records results
45
46
  end
46
47
  end
47
48
  end
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Elasticsearch
19
19
  module Model
20
- VERSION = "7.1.2.pre"
20
+ VERSION = "7.2.0"
21
21
  end
22
22
  end
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -33,14 +33,14 @@ describe Elasticsearch::Model::Client do
33
33
  context 'when a class includes the client module class methods' do
34
34
 
35
35
  it 'defines the client module class methods on the model' do
36
- expect(DummyClientModel.client).to be_a(Elasticsearch::Transport::Client)
36
+ expect(DummyClientModel.client).to be_a(Elasticsearch::Client)
37
37
  end
38
38
  end
39
39
 
40
40
  context 'when a class includes the client module instance methods' do
41
41
 
42
42
  it 'defines the client module class methods on the model' do
43
- expect(DummyClientModel.new.client).to be_a(Elasticsearch::Transport::Client)
43
+ expect(DummyClientModel.new.client).to be_a(Elasticsearch::Client)
44
44
  end
45
45
  end
46
46
 
@@ -77,7 +77,7 @@ describe Elasticsearch::Model::Client do
77
77
  end
78
78
 
79
79
  it 'does not set the client on the class' do
80
- expect(DummyClientModel.client).to be_a(Elasticsearch::Transport::Client)
80
+ expect(DummyClientModel.client).to be_a(Elasticsearch::Client)
81
81
  end
82
82
  end
83
83
  end
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -676,9 +676,13 @@ describe Elasticsearch::Model::Indexing do
676
676
  end
677
677
 
678
678
  context 'when the index is not found' do
679
+ let(:logger) { nil }
680
+ let(:transport) do
681
+ Elasticsearch::Transport::Client.new(logger: logger)
682
+ end
679
683
 
680
684
  let(:client) do
681
- double('client', indices: indices, transport: double('transport', { logger: nil }))
685
+ double('client', indices: indices, transport: transport)
682
686
  end
683
687
 
684
688
  let(:indices) do
@@ -692,19 +696,17 @@ describe Elasticsearch::Model::Indexing do
692
696
  end
693
697
 
694
698
  context 'when the force option is true' do
695
-
696
699
  it 'deletes the index without raising an exception' do
697
700
  expect(DummyIndexingModelForRecreate.delete_index!(force: true)).to be_nil
698
701
  end
699
702
 
700
703
  context 'when the client has a logger' do
701
-
702
704
  let(:logger) do
703
705
  Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG }
704
706
  end
705
707
 
706
708
  let(:client) do
707
- double('client', indices: indices, transport: double('transport', { logger: logger }))
709
+ double('client', indices: indices, transport: transport)
708
710
  end
709
711
 
710
712
  it 'deletes the index without raising an exception' do
@@ -912,7 +914,11 @@ describe Elasticsearch::Model::Indexing do
912
914
  end
913
915
 
914
916
  let(:client) do
915
- double('client', indices: indices, transport: double('transport', { logger: nil }))
917
+ double('client', indices: indices, transport: transport)
918
+ end
919
+
920
+ let(:transport) do
921
+ Elasticsearch::Transport::Client.new(logger: nil)
916
922
  end
917
923
 
918
924
  let(:indices) do
@@ -924,9 +930,7 @@ describe Elasticsearch::Model::Indexing do
924
930
  end
925
931
 
926
932
  context 'when the force option is true' do
927
-
928
933
  context 'when the operation raises a NotFound exception' do
929
-
930
934
  before do
931
935
  expect(indices).to receive(:refresh).and_raise(NotFound)
932
936
  end
@@ -936,13 +940,16 @@ describe Elasticsearch::Model::Indexing do
936
940
  end
937
941
 
938
942
  context 'when the client has a logger' do
939
-
940
943
  let(:logger) do
941
944
  Logger.new(STDOUT).tap { |l| l.level = Logger::DEBUG }
942
945
  end
943
946
 
944
947
  let(:client) do
945
- double('client', indices: indices, transport: double('transport', { logger: logger }))
948
+ double('client', indices: indices, transport: transport)
949
+ end
950
+
951
+ let(:transport) do
952
+ Elasticsearch::Transport::Client.new(logger: logger)
946
953
  end
947
954
 
948
955
  it 'does not raise an exception' do
@@ -957,7 +964,6 @@ describe Elasticsearch::Model::Indexing do
957
964
  end
958
965
 
959
966
  context 'when the operation raises another type of exception' do
960
-
961
967
  before do
962
968
  expect(indices).to receive(:refresh).and_raise(Exception)
963
969
  end
@@ -971,7 +977,6 @@ describe Elasticsearch::Model::Indexing do
971
977
  end
972
978
 
973
979
  context 'when an index name is provided in the options' do
974
-
975
980
  before do
976
981
  expect(indices).to receive(:refresh).with(index: 'custom-foo')
977
982
  end
@@ -6,7 +6,7 @@
6
6
  # not use this file except in compliance with the License.
7
7
  # You may obtain a copy of the License at
8
8
  #
9
- # http://www.apache.org/licenses/LICENSE-2.0
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
10
  #
11
11
  # Unless required by applicable law or agreed to in writing,
12
12
  # software distributed under the License is distributed on an
@@ -22,7 +22,7 @@ describe Elasticsearch::Model do
22
22
  describe '#client' do
23
23
 
24
24
  it 'should have a default' do
25
- expect(Elasticsearch::Model.client).to be_a(Elasticsearch::Transport::Client)
25
+ expect(Elasticsearch::Model.client).to be_a(Elasticsearch::Client)
26
26
  end
27
27
  end
28
28