sunspot_rails 2.2.7 → 2.2.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +1 -2
  3. data/Appraisals +60 -0
  4. data/Gemfile +3 -0
  5. data/gemfiles/.gitkeep +0 -0
  6. data/lib/sunspot/rails/solr_logging.rb +3 -3
  7. data/spec/configuration_spec.rb +67 -67
  8. data/spec/model_lifecycle_spec.rb +8 -8
  9. data/spec/model_spec.rb +72 -71
  10. data/spec/rails_app/app/controllers/application_controller.rb +4 -0
  11. data/spec/rails_app/app/controllers/posts_controller.rb +16 -0
  12. data/spec/{rails_template → rails_app}/app/models/author.rb +0 -0
  13. data/spec/{rails_template → rails_app}/app/models/blog.rb +0 -0
  14. data/spec/{rails_template → rails_app}/app/models/location.rb +0 -0
  15. data/spec/{rails_template → rails_app}/app/models/photo_post.rb +0 -0
  16. data/spec/{rails_template → rails_app}/app/models/post.rb +0 -0
  17. data/spec/{rails_template → rails_app}/app/models/post_with_auto.rb +0 -0
  18. data/spec/{rails_template → rails_app}/app/models/post_with_default_scope.rb +0 -0
  19. data/spec/{rails_template → rails_app}/app/models/post_with_only_some_attributes_triggering_reindex.rb +0 -0
  20. data/spec/{rails_template → rails_app}/app/models/rake_task_auto_load_test_model.rb +0 -0
  21. data/spec/rails_app/config.ru +4 -0
  22. data/spec/rails_app/config/application.rb +14 -0
  23. data/spec/rails_app/config/boot.rb +6 -0
  24. data/spec/rails_app/config/database.yml +5 -0
  25. data/spec/rails_app/config/environment.rb +5 -0
  26. data/spec/rails_app/config/environments/test.rb +38 -0
  27. data/spec/{rails_template → rails_app}/config/initializers/rails_5_override.rb +0 -0
  28. data/spec/rails_app/config/initializers/secret_token.rb +1 -0
  29. data/spec/rails_app/config/initializers/session_store.rb +3 -0
  30. data/spec/{rails_template → rails_app}/config/routes.rb +0 -0
  31. data/spec/{rails_template → rails_app}/config/sunspot.yml +0 -0
  32. data/spec/rails_app/db/schema.rb +26 -0
  33. data/spec/rake_task_spec.rb +8 -8
  34. data/spec/request_lifecycle_spec.rb +12 -16
  35. data/spec/schema.rb +8 -9
  36. data/spec/searchable_spec.rb +4 -4
  37. data/spec/server_spec.rb +7 -7
  38. data/spec/session_spec.rb +3 -3
  39. data/spec/shared_examples/indexed_after_save.rb +1 -1
  40. data/spec/shared_examples/not_indexed_after_save.rb +1 -1
  41. data/spec/spec_helper.rb +18 -51
  42. data/spec/stub_session_proxy_spec.rb +36 -36
  43. data/sunspot_rails.gemspec +6 -3
  44. metadata +94 -58
  45. data/dev_tasks/spec.rake +0 -97
  46. data/gemfiles/rails-3.0.0 +0 -21
  47. data/gemfiles/rails-3.1.0 +0 -21
  48. data/gemfiles/rails-3.2.0 +0 -21
  49. data/gemfiles/rails-4.0.0 +0 -25
  50. data/gemfiles/rails-4.1.0 +0 -24
  51. data/gemfiles/rails-4.2.0 +0 -24
  52. data/gemfiles/rails-5.0 +0 -20
  53. data/spec/rails_template/app/controllers/application_controller.rb +0 -10
  54. data/spec/rails_template/app/controllers/posts_controller.rb +0 -6
  55. data/spec/rails_template/config/database.yml +0 -11
  56. data/spec/rails_template/db/schema.rb +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9c73686a623e0b8085e678093d6d80a94a65f988
4
- data.tar.gz: 218687305e166d54d3e5240be43cde53c8487abd
2
+ SHA256:
3
+ metadata.gz: 846b1e615a854510c5027c97856eba487a2179d38ca0d3be15f89b911cc6fb60
4
+ data.tar.gz: 46a293fb375ac70062cce75885ad936724df1f5c1888cbda66d60a469841418c
5
5
  SHA512:
6
- metadata.gz: fb98a7c070f2ca26b62911ca89011bb84f9ac02aa67a6a63f11021a3825d52e65a4956ad647563b82f14ebdc953486a7fd9b58bb40a78643dc3155fb5ebd3339
7
- data.tar.gz: 98c9d8a7acc171cda06429a97eaa6a9ca0874a26c8bb923cd1008b69926d88b0ca882ce847f2df51bf425787fa622909db25095da39fa1cd4c5afc9f3062d320
6
+ metadata.gz: 9f122dc6d0481e2740a504f3415bc4c00f892cb999c950535f55cf11ed5dc443a8335c09b42543b29bb885805c630896052560e7a83900d9ff0831cd18889dbe
7
+ data.tar.gz: ee63fcc4578de9c64350f759341aa7296ca521644cdb5cf6bbd82eaaedd2bf47fb2138ebfeac5588f739b453758dddf24fd454d63366eb628ff33854dc5a0795
data/.gitignore CHANGED
@@ -3,5 +3,4 @@ doc
3
3
  pkg/*
4
4
  log
5
5
  .bundle
6
- tmp/*
7
- gemfiles/*.lock
6
+ gemfiles/*.gemfile*
@@ -0,0 +1,60 @@
1
+ ruby_version = Gem::Version.new(RUBY_VERSION)
2
+
3
+ if ruby_version < Gem::Version.new('2.2.0')
4
+ ['3.0.0', '3.1.0'].each do |rails_version|
5
+ appraise "rails-#{rails_version}" do
6
+ gem 'sunspot', path: File.expand_path('sunspot', ENV['SUNSPOT_LIB_HOME'])
7
+ gem 'sunspot_solr', path: File.expand_path('sunspot_solr', ENV['SUNSPOT_LIB_HOME'])
8
+ gem 'rails', "~> #{rails_version}"
9
+ gem 'progress_bar', '~> 1.0.5', require: false
10
+ gem 'rspec', '~> 3.4.0'
11
+ gem 'rspec-rails', '~> 3.4.0'
12
+ end
13
+ end
14
+ end
15
+
16
+ if ruby_version < Gem::Version.new('2.4.0')
17
+ appraise 'rails-3.2.0' do
18
+ gem 'sunspot', path: File.expand_path('sunspot', ENV['SUNSPOT_LIB_HOME'])
19
+ gem 'sunspot_solr', path: File.expand_path('sunspot_solr', ENV['SUNSPOT_LIB_HOME'])
20
+ gem 'rails', '~> 3.2.0'
21
+ gem 'progress_bar', '~> 1.0.5', require: false
22
+ gem 'test-unit', '~> 3.2.0'
23
+ gem 'rspec', '~> 3.4.0'
24
+ gem 'rspec-rails', '~> 3.4.0'
25
+ end
26
+
27
+ ['4.0.0', '4.1.0'].each do |rails_version|
28
+ appraise "rails-#{rails_version}" do
29
+ gem 'sunspot', path: File.expand_path('sunspot', ENV['SUNSPOT_LIB_HOME'])
30
+ gem 'sunspot_solr', path: File.expand_path('sunspot_solr', ENV['SUNSPOT_LIB_HOME'])
31
+ gem 'rails', "~> #{rails_version}"
32
+ gem 'protected_attributes'
33
+ gem 'progress_bar', '~> 1.0.5', require: false
34
+ gem 'rspec', '~> 3.4.0'
35
+ gem 'rspec-rails', '~> 3.4.0'
36
+ end
37
+ end
38
+ end
39
+
40
+ appraise 'rails-4.2.0' do
41
+ gem 'sunspot', path: File.expand_path('sunspot', ENV['SUNSPOT_LIB_HOME'])
42
+ gem 'sunspot_solr', path: File.expand_path('sunspot_solr', ENV['SUNSPOT_LIB_HOME'])
43
+ gem 'rails', '~> 4.2.0'
44
+ gem 'protected_attributes'
45
+ gem 'progress_bar', '~> 1.0.5', require: false
46
+ gem 'rspec', '~> 3.4.0'
47
+ gem 'rspec-rails', '~> 3.4.0'
48
+ end
49
+
50
+ if ruby_version >= Gem::Version.new('2.2.0')
51
+ ['5.0.0', '5.1.0'].each do |rails_version|
52
+ appraise "rails-#{rails_version}" do
53
+ gem 'sunspot', path: File.expand_path('sunspot', ENV['SUNSPOT_LIB_HOME'])
54
+ gem 'sunspot_solr', path: File.expand_path('sunspot_solr', ENV['SUNSPOT_LIB_HOME'])
55
+ gem 'rails', "~> #{rails_version}"
56
+ gem 'protected_attributes_continued'
57
+ gem 'progress_bar', '~> 1.0.5', require: false
58
+ end
59
+ end
60
+ end
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "http://rubygems.org"
2
+
3
+ gemspec
File without changes
@@ -4,7 +4,7 @@ module Sunspot
4
4
 
5
5
  COMMIT = %r{<commit/>}
6
6
 
7
- def execute_with_rails_logging(client, request_context)
7
+ def execute_with_rails_logging(request_context)
8
8
  body = (request_context[:data]||"").dup
9
9
  action = request_context[:path].capitalize
10
10
  if body =~ COMMIT
@@ -16,7 +16,7 @@ module Sunspot
16
16
  response = nil
17
17
  begin
18
18
  ms = Benchmark.ms do
19
- response = execute_without_rails_logging(client, request_context)
19
+ response = execute_without_rails_logging(request_context)
20
20
  end
21
21
  log_name = 'Solr %s (%.1fms)' % [action, ms]
22
22
  ::Rails.logger.debug(format_log_entry(log_name, body))
@@ -47,7 +47,7 @@ module Sunspot
47
47
  end
48
48
  end
49
49
 
50
- RSolr::Connection.module_eval do
50
+ RSolr::Client.class_eval do
51
51
  include Sunspot::Rails::SolrLogging
52
52
  alias_method :execute_without_rails_logging, :execute
53
53
  alias_method :execute, :execute_with_rails_logging
@@ -2,50 +2,50 @@ require File.expand_path('spec_helper', File.dirname(__FILE__))
2
2
 
3
3
  describe Sunspot::Rails::Configuration, "default values without a sunspot.yml" do
4
4
  before(:each) do
5
- File.stub(:exist?).and_return(false) # simulate sunspot.yml not existing
5
+ allow(File).to receive(:exist?).and_return(false) # simulate sunspot.yml not existing
6
6
  @config = Sunspot::Rails::Configuration.new
7
7
  end
8
8
 
9
9
  it "should handle the 'hostname' property when not set" do
10
- @config.hostname.should == 'localhost'
10
+ expect(@config.hostname).to eq('localhost')
11
11
  end
12
12
 
13
13
  it "should handle the 'path' property when not set" do
14
- @config.path.should == '/solr/default'
14
+ expect(@config.path).to eq('/solr/default')
15
15
  end
16
16
 
17
17
  it "should set the scheme to http" do
18
- @config.scheme.should == "http"
18
+ expect(@config.scheme).to eq("http")
19
19
  end
20
20
 
21
21
  it "should not have userinfo" do
22
- @config.userinfo.should be_nil
22
+ expect(@config.userinfo).to be_nil
23
23
  end
24
24
 
25
25
  it "should not set a proxy" do
26
- @config.proxy.should be_nil
26
+ expect(@config.proxy).to be_nil
27
27
  end
28
28
 
29
29
  describe "port" do
30
30
  it "should default to port 8981 in test" do
31
- ::Rails.stub(:env => 'test')
31
+ allow(::Rails).to receive(:env).and_return('test')
32
32
  @config = Sunspot::Rails::Configuration.new
33
- @config.port.should == 8981
33
+ expect(@config.port).to eq(8981)
34
34
  end
35
35
  it "should default to port 8982 in development" do
36
- ::Rails.stub(:env => 'development')
36
+ allow(::Rails).to receive(:env).and_return('development')
37
37
  @config = Sunspot::Rails::Configuration.new
38
- @config.port.should == 8982
38
+ expect(@config.port).to eq(8982)
39
39
  end
40
40
  it "should default to 8983 in production" do
41
- ::Rails.stub(:env => 'production')
41
+ allow(::Rails).to receive(:env).and_return('production')
42
42
  @config = Sunspot::Rails::Configuration.new
43
- @config.port.should == 8983
43
+ expect(@config.port).to eq(8983)
44
44
  end
45
45
  it "should generally default to 8983" do
46
- ::Rails.stub(:env => 'staging')
46
+ allow(::Rails).to receive(:env).and_return('staging')
47
47
  @config = Sunspot::Rails::Configuration.new
48
- @config.port.should == 8983
48
+ expect(@config.port).to eq(8983)
49
49
  end
50
50
  end
51
51
 
@@ -58,139 +58,139 @@ describe Sunspot::Rails::Configuration, "default values without a sunspot.yml" d
58
58
  end
59
59
 
60
60
  it "should set 'log_level' property using Rails log level when not set" do
61
- ::Rails.logger.stub(:level){ 3 }
62
- @config.log_level.should == 'SEVERE'
61
+ allow(::Rails.logger).to receive(:level){ 3 }
62
+ expect(@config.log_level).to eq('SEVERE')
63
63
  end
64
64
 
65
65
  it "should handle the 'log_file' property" do
66
- @config.log_file.should =~ /log\/solr_test.log/
66
+ expect(@config.log_file).to match(/log\/solr_test.log/)
67
67
  end
68
68
 
69
69
  it "should handle the 'solr_home' property when not set" do
70
- Rails.should_receive(:root).at_least(1).and_return('/some/path')
71
- @config.solr_home.should == '/some/path/solr'
70
+ expect(Rails).to receive(:root).at_least(1).and_return('/some/path')
71
+ expect(@config.solr_home).to eq('/some/path/solr')
72
72
  end
73
73
 
74
74
  it "should handle the 'pid_dir' property when not set" do
75
- Rails.should_receive(:root).at_least(1).and_return('/some/path')
76
- @config.pid_dir.should == '/some/path/solr/pids/test'
75
+ expect(Rails).to receive(:root).at_least(1).and_return('/some/path')
76
+ expect(@config.pid_dir).to eq('/some/path/solr/pids/test')
77
77
  end
78
78
 
79
79
  it "should handle the 'auto_commit_after_request' propery when not set" do
80
- @config.auto_commit_after_request?.should == true
80
+ expect(@config.auto_commit_after_request?).to eq(true)
81
81
  end
82
82
 
83
83
  it "should handle the 'auto_commit_after_delete_request' propery when not set" do
84
- @config.auto_commit_after_delete_request?.should == false
84
+ expect(@config.auto_commit_after_delete_request?).to eq(false)
85
85
  end
86
86
 
87
87
  it "should handle the 'bind_address' property when not set" do
88
- @config.bind_address.should be_nil
88
+ expect(@config.bind_address).to be_nil
89
89
  end
90
90
 
91
91
  it "should handle the 'disabled' property when not set" do
92
- @config.disabled?.should be_false
92
+ expect(@config.disabled?).to be_falsey
93
93
  end
94
94
 
95
95
  it "should handle the 'auto_index_callback' property when not set" do
96
- @config.auto_index_callback.should == "after_save"
96
+ expect(@config.auto_index_callback).to eq("after_save")
97
97
  end
98
98
 
99
99
  it "should handle the 'auto_remove_callback' property when not set" do
100
- @config.auto_remove_callback.should == "after_destroy"
100
+ expect(@config.auto_remove_callback).to eq("after_destroy")
101
101
  end
102
102
  end
103
103
 
104
104
  describe Sunspot::Rails::Configuration, "user provided sunspot.yml" do
105
105
  before(:each) do
106
- ::Rails.stub(:env => 'config_test')
106
+ allow(::Rails).to receive(:env).and_return('config_test')
107
107
  @config = Sunspot::Rails::Configuration.new
108
108
  end
109
109
 
110
110
  it "should handle the 'scheme' property when set" do
111
- @config.scheme.should == "http"
111
+ expect(@config.scheme).to eq("http")
112
112
  end
113
113
 
114
114
  it "should handle the 'user' and 'pass' properties when set" do
115
- @config.userinfo.should == "user:pass"
115
+ expect(@config.userinfo).to eq("user:pass")
116
116
  end
117
117
 
118
118
  it "should handle the 'hostname' property when set" do
119
- @config.hostname.should == 'some.host'
119
+ expect(@config.hostname).to eq('some.host')
120
120
  end
121
121
 
122
122
  it "should handle the 'port' property when set" do
123
- @config.port.should == 1234
123
+ expect(@config.port).to eq(1234)
124
124
  end
125
125
 
126
126
  it "should handle the 'path' property when set" do
127
- @config.path.should == '/solr/idx'
127
+ expect(@config.path).to eq('/solr/idx')
128
128
  end
129
129
 
130
130
  it "should handle the 'log_level' propery when set" do
131
- @config.log_level.should == 'WARNING'
131
+ expect(@config.log_level).to eq('WARNING')
132
132
  end
133
133
 
134
134
  it "should handle the 'solr_home' propery when set" do
135
- @config.solr_home.should == '/my_superior_path'
135
+ expect(@config.solr_home).to eq('/my_superior_path')
136
136
  end
137
137
 
138
138
  it "should handle the 'pid_dir' property when set" do
139
- @config.pid_dir.should == '/my_superior_path/pids'
139
+ expect(@config.pid_dir).to eq('/my_superior_path/pids')
140
140
  end
141
141
 
142
142
  it "should handle the 'solr_home' property when set" do
143
- @config.solr_home.should == '/my_superior_path'
143
+ expect(@config.solr_home).to eq('/my_superior_path')
144
144
  end
145
145
 
146
146
  it "should handle the 'auto_commit_after_request' propery when set" do
147
- @config.auto_commit_after_request?.should == false
147
+ expect(@config.auto_commit_after_request?).to eq(false)
148
148
  end
149
149
 
150
150
  it "should handle the 'auto_commit_after_delete_request' propery when set" do
151
- @config.auto_commit_after_delete_request?.should == true
151
+ expect(@config.auto_commit_after_delete_request?).to eq(true)
152
152
  end
153
153
 
154
154
  it "should handle the 'bind_address' property when set" do
155
- @config.bind_address.should == "127.0.0.1"
155
+ expect(@config.bind_address).to eq("127.0.0.1")
156
156
  end
157
157
 
158
158
  it "should handle the 'read_timeout' property when set" do
159
- @config.read_timeout.should == 2
159
+ expect(@config.read_timeout).to eq(2)
160
160
  end
161
161
 
162
162
  it "should handle the 'open_timeout' property when set" do
163
- @config.open_timeout.should == 0.5
163
+ expect(@config.open_timeout).to eq(0.5)
164
164
  end
165
165
 
166
166
  it "should handle the 'proxy' property when set" do
167
- @config.proxy.should == 'http://proxy.com:12345'
167
+ expect(@config.proxy).to eq('http://proxy.com:12345')
168
168
  end
169
169
  end
170
170
 
171
171
  describe Sunspot::Rails::Configuration, "with auto_index_callback and auto_remove_callback set" do
172
172
  before do
173
- ::Rails.stub(:env => 'config_commit_test')
173
+ allow(::Rails).to receive(:env).and_return('config_commit_test')
174
174
  @config = Sunspot::Rails::Configuration.new
175
175
  end
176
176
 
177
177
  it "should handle the 'auto_index_callback' property when set" do
178
- @config.auto_index_callback.should == "after_commit"
178
+ expect(@config.auto_index_callback).to eq("after_commit")
179
179
  end
180
180
 
181
181
  it "should handle the 'auto_remove_callback' property when set" do
182
- @config.auto_remove_callback.should == "after_commit"
182
+ expect(@config.auto_remove_callback).to eq("after_commit")
183
183
  end
184
184
  end
185
185
 
186
186
  describe Sunspot::Rails::Configuration, "with disabled: true in sunspot.yml" do
187
187
  before(:each) do
188
- ::Rails.stub(:env => 'config_disabled_test')
188
+ allow(::Rails).to receive(:env).and_return('config_disabled_test')
189
189
  @config = Sunspot::Rails::Configuration.new
190
190
  end
191
191
 
192
192
  it "should handle the 'disabled' property when set" do
193
- @config.disabled?.should be_true
193
+ expect(@config.disabled?).to be_truthy
194
194
  end
195
195
  end
196
196
 
@@ -200,7 +200,7 @@ describe Sunspot::Rails::Configuration, "with ENV['SOLR_URL'] overriding sunspot
200
200
  end
201
201
 
202
202
  before(:each) do
203
- ::Rails.stub(:env => 'config_test')
203
+ allow(::Rails).to receive(:env).and_return('config_test')
204
204
  @config = Sunspot::Rails::Configuration.new
205
205
  end
206
206
 
@@ -209,15 +209,15 @@ describe Sunspot::Rails::Configuration, "with ENV['SOLR_URL'] overriding sunspot
209
209
  end
210
210
 
211
211
  it "should handle the 'hostname' property when set" do
212
- @config.hostname.should == 'environment.host'
212
+ expect(@config.hostname).to eq('environment.host')
213
213
  end
214
214
 
215
215
  it "should handle the 'port' property when set" do
216
- @config.port.should == 5432
216
+ expect(@config.port).to eq(5432)
217
217
  end
218
218
 
219
219
  it "should handle the 'path' property when set" do
220
- @config.path.should == '/solr/env'
220
+ expect(@config.path).to eq('/solr/env')
221
221
  end
222
222
  end
223
223
 
@@ -227,7 +227,7 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] overriding suns
227
227
  end
228
228
 
229
229
  before(:each) do
230
- ::Rails.stub(:env => 'config_test')
230
+ allow(::Rails).to receive(:env).and_return('config_test')
231
231
  @config = Sunspot::Rails::Configuration.new
232
232
  end
233
233
 
@@ -236,15 +236,15 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] overriding suns
236
236
  end
237
237
 
238
238
  it "should handle the 'hostname' property when set" do
239
- @config.hostname.should == 'index.websolr.test'
239
+ expect(@config.hostname).to eq('index.websolr.test')
240
240
  end
241
241
 
242
242
  it "should handle the 'port' property when set" do
243
- @config.port.should == 80
243
+ expect(@config.port).to eq(80)
244
244
  end
245
245
 
246
246
  it "should handle the 'path' property when set" do
247
- @config.path.should == '/solr/a1b2c3d4e5f'
247
+ expect(@config.path).to eq('/solr/a1b2c3d4e5f')
248
248
  end
249
249
  end
250
250
 
@@ -254,7 +254,7 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] using https" do
254
254
  end
255
255
 
256
256
  before(:each) do
257
- ::Rails.stub(:env => 'config_test')
257
+ allow(::Rails).to receive(:env).and_return('config_test')
258
258
  @config = Sunspot::Rails::Configuration.new
259
259
  end
260
260
 
@@ -263,19 +263,19 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] using https" do
263
263
  end
264
264
 
265
265
  it "should set the scheme to https" do
266
- @config.scheme.should == "https"
266
+ expect(@config.scheme).to eq("https")
267
267
  end
268
268
 
269
269
  it "should handle the 'hostname' property when set" do
270
- @config.hostname.should == 'index.websolr.test'
270
+ expect(@config.hostname).to eq('index.websolr.test')
271
271
  end
272
272
 
273
273
  it "should handle the 'port' property when set" do
274
- @config.port.should == 443
274
+ expect(@config.port).to eq(443)
275
275
  end
276
276
 
277
277
  it "should handle the 'path' property when set" do
278
- @config.path.should == '/solr/a1b2c3d4e5f'
278
+ expect(@config.path).to eq('/solr/a1b2c3d4e5f')
279
279
  end
280
280
  end
281
281
 
@@ -285,7 +285,7 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] including useri
285
285
  end
286
286
 
287
287
  before(:each) do
288
- ::Rails.stub(:env => 'config_test')
288
+ allow(::Rails).to receive(:env).and_return('config_test')
289
289
  @config = Sunspot::Rails::Configuration.new
290
290
  end
291
291
 
@@ -294,22 +294,22 @@ describe Sunspot::Rails::Configuration, "with ENV['WEBSOLR_URL'] including useri
294
294
  end
295
295
 
296
296
  it "should include username and passowrd" do
297
- @config.userinfo.should == "user:pass"
297
+ expect(@config.userinfo).to eq("user:pass")
298
298
  end
299
299
 
300
300
  it "should set the scheme to https" do
301
- @config.scheme.should == "https"
301
+ expect(@config.scheme).to eq("https")
302
302
  end
303
303
 
304
304
  it "should handle the 'hostname' property when set" do
305
- @config.hostname.should == 'index.websolr.test'
305
+ expect(@config.hostname).to eq('index.websolr.test')
306
306
  end
307
307
 
308
308
  it "should handle the 'port' property when set" do
309
- @config.port.should == 443
309
+ expect(@config.port).to eq(443)
310
310
  end
311
311
 
312
312
  it "should handle the 'path' property when set" do
313
- @config.path.should == '/solr/a1b2c3d4e5f'
313
+ expect(@config.path).to eq('/solr/a1b2c3d4e5f')
314
314
  end
315
315
  end