localeapp 0.9.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,14 +8,14 @@ describe Localeapp::CLI::Install, '.execute(key = nil)' do
8
8
 
9
9
  it "creates the installer based on the config type" do
10
10
  command.config_type = :heroku
11
- command.should_receive(:installer).with("HerokuInstaller").and_return(double.as_null_object)
11
+ expect(command).to receive(:installer).with("HerokuInstaller").and_return(double.as_null_object)
12
12
  command.execute(key)
13
13
  end
14
14
 
15
15
  it "executes the installer with the given key" do
16
16
  installer = double(:installer)
17
- installer.should_receive(:execute).with(key)
18
- command.stub(:installer).and_return(installer)
17
+ expect(installer).to receive(:execute).with(key)
18
+ allow(command).to receive(:installer).and_return(installer)
19
19
  command.execute(key)
20
20
  end
21
21
  end
@@ -26,58 +26,58 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#execute(key = nil)' do
26
26
  let(:installer) { Localeapp::CLI::Install::DefaultInstaller.new(output) }
27
27
 
28
28
  before do
29
- installer.stub(:print_header)
30
- installer.stub(:validate_key).and_return(false)
29
+ allow(installer).to receive(:print_header)
30
+ allow(installer).to receive(:validate_key).and_return(false)
31
31
  end
32
32
 
33
33
  it "prints the header" do
34
- installer.should_receive(:print_header)
34
+ expect(installer).to receive(:print_header)
35
35
  installer.execute
36
36
  end
37
37
 
38
38
  it "validates the key" do
39
- installer.should_receive(:key=).with(key)
40
- installer.should_receive(:validate_key)
39
+ expect(installer).to receive(:key=).with(key)
40
+ expect(installer).to receive(:validate_key)
41
41
  installer.execute(key)
42
42
  end
43
43
 
44
44
  context "When key validation fails" do
45
45
  it "returns false" do
46
- installer.execute(key).should == false
46
+ expect(installer.execute(key)).to eq(false)
47
47
  end
48
48
  end
49
49
 
50
50
  context "When key validation is successful" do
51
51
  before do
52
- installer.stub(:validate_key).and_return(true)
53
- installer.stub(:check_default_locale)
54
- installer.stub(:set_config_paths)
55
- installer.stub(:write_config_file)
56
- installer.stub(:check_data_directory_exists)
52
+ allow(installer).to receive(:validate_key).and_return(true)
53
+ allow(installer).to receive(:check_default_locale)
54
+ allow(installer).to receive(:set_config_paths)
55
+ allow(installer).to receive(:write_config_file)
56
+ allow(installer).to receive(:check_data_directory_exists)
57
57
  end
58
58
 
59
59
  it "checks the default locale" do
60
- installer.should_receive(:check_default_locale)
60
+ expect(installer).to receive(:check_default_locale)
61
61
  installer.execute(key)
62
62
  end
63
63
 
64
64
  it "sets the configuration paths" do
65
- installer.should_receive(:set_config_paths)
65
+ expect(installer).to receive(:set_config_paths)
66
66
  installer.execute(key)
67
67
  end
68
68
 
69
69
  it "writes the configuration file" do
70
- installer.should_receive(:write_config_file)
70
+ expect(installer).to receive(:write_config_file)
71
71
  installer.execute(key)
72
72
  end
73
73
 
74
74
  it "checks the data directory exists" do
75
- installer.should_receive(:check_data_directory_exists)
75
+ expect(installer).to receive(:check_data_directory_exists)
76
76
  installer.execute(key)
77
77
  end
78
78
 
79
79
  it "returns true" do
80
- installer.execute(key).should == true
80
+ expect(installer.execute(key)).to eq(true)
81
81
  end
82
82
  end
83
83
  end
@@ -94,19 +94,19 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#validate_key(key)' do
94
94
  it "displays error if key is nil" do
95
95
  installer.key = nil
96
96
  installer.validate_key
97
- output.string.should match(/You must supply an API key/)
97
+ expect(output.string).to match(/You must supply an API key/)
98
98
  end
99
99
 
100
100
  it "displays error if the key is there but isn't valid on localeapp.com" do
101
- installer.stub(:check_key).and_return([false, {}])
101
+ allow(installer).to receive(:check_key).and_return([false, {}])
102
102
  installer.validate_key
103
- output.string.should match(/Project not found/)
103
+ expect(output.string).to match(/Project not found/)
104
104
  end
105
105
 
106
106
  it "displays project name if the key is there and valid on localeapp.com" do
107
- installer.stub(:check_key).and_return([true, valid_project_data])
107
+ allow(installer).to receive(:check_key).and_return([true, valid_project_data])
108
108
  installer.validate_key
109
- output.string.should match(/Test Project/)
109
+ expect(output.string).to match(/Test Project/)
110
110
  end
111
111
  end
112
112
 
@@ -115,18 +115,18 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#check_default_locale' do
115
115
  let(:installer) { Localeapp::CLI::Install::DefaultInstaller.new(output) }
116
116
 
117
117
  before do
118
- installer.stub(:project_data).and_return(valid_project_data)
118
+ allow(installer).to receive(:project_data).and_return(valid_project_data)
119
119
  end
120
120
 
121
121
  it "displays project base locale" do
122
122
  installer.check_default_locale
123
- output.string.should match(/en \(English\)/)
123
+ expect(output.string).to match(/en \(English\)/)
124
124
  end
125
125
 
126
126
  it "displays warning if I18n.default_locale doesn't match what's configured on localeapp.com" do
127
- I18n.stub(:default_locale).and_return(:es)
127
+ allow(I18n).to receive(:default_locale).and_return(:es)
128
128
  installer.check_default_locale
129
- output.string.should match(%r{WARNING: I18n.default_locale is es, change in config/environment.rb \(Rails 2\) or config/application.rb \(Rails 3\)})
129
+ expect(output.string).to match(%r{WARNING: I18n.default_locale is es, change in config/environment.rb \(Rails 2\) or config/application.rb \(Rails 3\)})
130
130
  end
131
131
  end
132
132
 
@@ -139,11 +139,11 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#set_config_paths' do
139
139
  end
140
140
 
141
141
  it "sets the initializer config_file_path for a rails app" do
142
- installer.config_file_path.should == "config/initializers/localeapp.rb"
142
+ expect(installer.config_file_path).to eq("config/initializers/localeapp.rb")
143
143
  end
144
144
 
145
145
  it "sets the data directory for a rails app" do
146
- installer.data_directory.should == "config/locales"
146
+ expect(installer.data_directory).to eq("config/locales")
147
147
  end
148
148
  end
149
149
 
@@ -157,14 +157,14 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#write_config_file' do
157
157
  installer.key = key
158
158
  installer.config_file_path = config_file_path
159
159
  file = double('file')
160
- file.should_receive(:write).with <<-CONTENT
160
+ expect(file).to receive(:write).with <<-CONTENT
161
161
  require 'localeapp/rails'
162
162
 
163
163
  Localeapp.configure do |config|
164
164
  config.api_key = 'APIKEY'
165
165
  end
166
166
  CONTENT
167
- File.should_receive(:open).with(config_file_path, 'w+').and_yield(file)
167
+ expect(File).to receive(:open).with(config_file_path, 'w+').and_yield(file)
168
168
  installer.write_config_file
169
169
  end
170
170
  end
@@ -179,15 +179,15 @@ describe Localeapp::CLI::Install::DefaultInstaller, '#check_data_directory_exist
179
179
  end
180
180
 
181
181
  it "displays warning if config.translation_data_directory doesn't exist" do
182
- File.stub(:directory?).with(data_directory).and_return(false)
182
+ allow(File).to receive(:directory?).with(data_directory).and_return(false)
183
183
  installer.check_data_directory_exists
184
- output.string.should match(/Your translation data will be stored there./)
184
+ expect(output.string).to match(/Your translation data will be stored there./)
185
185
  end
186
186
 
187
187
  it "doesn't display a warning if translation_data_directory exists" do
188
- File.stub(:directory?).with(data_directory).and_return(true)
188
+ allow(File).to receive(:directory?).with(data_directory).and_return(true)
189
189
  installer.check_data_directory_exists
190
- output.string.should == ''
190
+ expect(output.string).to eq('')
191
191
  end
192
192
  end
193
193
 
@@ -201,7 +201,7 @@ describe Localeapp::CLI::Install::HerokuInstaller, '#write_config_file' do
201
201
  installer.key = key
202
202
  installer.config_file_path = config_file_path
203
203
  file = double('file')
204
- file.should_receive(:write).with <<-CONTENT
204
+ expect(file).to receive(:write).with <<-CONTENT
205
205
  require 'localeapp/rails'
206
206
 
207
207
  Localeapp.configure do |config|
@@ -217,7 +217,7 @@ if defined?(Rails) && Rails.env.staging?
217
217
  Localeapp::CLI::Pull.new.execute
218
218
  end
219
219
  CONTENT
220
- File.should_receive(:open).with(config_file_path, 'w+').and_yield(file)
220
+ expect(File).to receive(:open).with(config_file_path, 'w+').and_yield(file)
221
221
  installer.write_config_file
222
222
  end
223
223
  end
@@ -227,7 +227,7 @@ describe Localeapp::CLI::Install::StandaloneInstaller, '#check_default_locale' d
227
227
 
228
228
  it "does nothing" do
229
229
  installer.check_default_locale
230
- output.string.should == ''
230
+ expect(output.string).to eq('')
231
231
  end
232
232
  end
233
233
 
@@ -240,11 +240,11 @@ describe Localeapp::CLI::Install::StandaloneInstaller, '#set_config_paths' do
240
240
  end
241
241
 
242
242
  it "sets the initializer config_file_path for a standalone app" do
243
- installer.config_file_path.should == ".localeapp/config.rb"
243
+ expect(installer.config_file_path).to eq(".localeapp/config.rb")
244
244
  end
245
245
 
246
246
  it "sets the data directory for a standalone app" do
247
- installer.data_directory.should == "locales"
247
+ expect(installer.data_directory).to eq("locales")
248
248
  end
249
249
  end
250
250
 
@@ -256,12 +256,12 @@ describe Localeapp::CLI::Install::StandaloneInstaller, '#write_config_file' do
256
256
  let(:installer) { Localeapp::CLI::Install::StandaloneInstaller.new(output) }
257
257
 
258
258
  it "creates a configuration file containing the dot file configuration at the given config_file_path" do
259
- installer.stub(:create_config_dir).and_return(File.dirname(config_file_path))
259
+ allow(installer).to receive(:create_config_dir).and_return(File.dirname(config_file_path))
260
260
  installer.key = key
261
261
  installer.config_file_path = config_file_path
262
262
  installer.data_directory = data_directory
263
263
  file = double('file')
264
- file.should_receive(:write).with <<-CONTENT
264
+ expect(file).to receive(:write).with <<-CONTENT
265
265
  Localeapp.configure do |config|
266
266
  config.api_key = 'APIKEY'
267
267
  config.translation_data_directory = 'locales'
@@ -269,7 +269,7 @@ Localeapp.configure do |config|
269
269
  config.daemon_pid_file = '.localeapp/localeapp.pid'
270
270
  end
271
271
  CONTENT
272
- File.should_receive(:open).with(config_file_path, 'w+').and_yield(file)
272
+ expect(File).to receive(:open).with(config_file_path, 'w+').and_yield(file)
273
273
  installer.write_config_file
274
274
  end
275
275
  end
@@ -285,30 +285,30 @@ describe Localeapp::CLI::Install::GithubInstaller, '#write_config_file' do
285
285
  installer.key = key
286
286
  installer.config_file_path = config_file_path
287
287
  installer.data_directory = data_directory
288
- installer.stub(:create_config_dir).and_return(File.dirname(config_file_path))
289
- installer.stub(:write_standalone_config)
290
- installer.stub(:create_data_directory)
291
- installer.stub(:create_gitignore)
292
- installer.stub(:create_readme)
288
+ allow(installer).to receive(:create_config_dir).and_return(File.dirname(config_file_path))
289
+ allow(installer).to receive(:write_standalone_config)
290
+ allow(installer).to receive(:create_data_directory)
291
+ allow(installer).to receive(:create_gitignore)
292
+ allow(installer).to receive(:create_readme)
293
293
  end
294
294
 
295
295
  it "creates a standalone configuration file" do
296
- installer.should_receive(:write_standalone_config)
296
+ expect(installer).to receive(:write_standalone_config)
297
297
  installer.write_config_file
298
298
  end
299
299
 
300
300
  it "creates the data_directory" do
301
- installer.should_receive(:create_data_directory)
301
+ expect(installer).to receive(:create_data_directory)
302
302
  installer.write_config_file
303
303
  end
304
304
 
305
305
  it "creates the .gitignore file" do
306
- installer.should_receive(:create_gitignore)
306
+ expect(installer).to receive(:create_gitignore)
307
307
  installer.write_config_file
308
308
  end
309
309
 
310
310
  it "creates the READMI file" do
311
- installer.should_receive(:create_readme)
311
+ expect(installer).to receive(:create_readme)
312
312
  installer.write_config_file
313
313
  end
314
314
  end
@@ -9,7 +9,7 @@ describe Localeapp::CLI::Pull, "#execute" do
9
9
 
10
10
  it "makes the api call to the translations endpoint" do
11
11
  with_configuration do
12
- @puller.should_receive(:api_call).with(
12
+ expect(@puller).to receive(:api_call).with(
13
13
  :export,
14
14
  :success => :update_backend,
15
15
  :failure => :report_failure,
@@ -29,16 +29,16 @@ describe Localeapp::CLI::Pull, "#update_backend(response)" do
29
29
 
30
30
  it "calls the updater" do
31
31
  with_configuration do
32
- Localeapp.poller.stub(:write_synchronization_data!)
33
- Localeapp.updater.should_receive(:dump).with(['test data'])
32
+ allow(Localeapp.poller).to receive(:write_synchronization_data!)
33
+ expect(Localeapp.updater).to receive(:dump).with(['test data'])
34
34
  @puller.update_backend(@test_data)
35
35
  end
36
36
  end
37
37
 
38
38
  it "writes the synchronization data" do
39
39
  with_configuration do
40
- Localeapp.updater.stub(:dump)
41
- Localeapp.poller.should_receive(:write_synchronization_data!)
40
+ allow(Localeapp.updater).to receive(:dump)
41
+ expect(Localeapp.poller).to receive(:write_synchronization_data!)
42
42
  @puller.update_backend(@test_data)
43
43
  end
44
44
  end
@@ -10,10 +10,10 @@ describe Localeapp::CLI::Push, "#execute(path)" do
10
10
  directory = double('directory')
11
11
  path = 'test_path'
12
12
  yaml_files = %w(en.yml es.yml)
13
- pusher.stub(:path_is_directory?).and_return(true)
14
- pusher.should_receive(:yaml_files_in_directory).with(path).and_return(yaml_files)
15
- pusher.should_receive(:push_file).with('en.yml')
16
- pusher.should_receive(:push_file).with('es.yml')
13
+ allow(pusher).to receive(:path_is_directory?).and_return(true)
14
+ expect(pusher).to receive(:yaml_files_in_directory).with(path).and_return(yaml_files)
15
+ expect(pusher).to receive(:push_file).with('en.yml')
16
+ expect(pusher).to receive(:push_file).with('es.yml')
17
17
  pusher.execute(path)
18
18
  end
19
19
  end
@@ -24,7 +24,7 @@ describe Localeapp::CLI::Push, "#execute(path)" do
24
24
  with_configuration do
25
25
  file = double('file')
26
26
  file_path = 'test_path'
27
- pusher.should_receive(:push_file).with(file_path)
27
+ expect(pusher).to receive(:push_file).with(file_path)
28
28
  pusher.execute(file_path)
29
29
  end
30
30
  end
@@ -39,8 +39,8 @@ describe Localeapp::CLI::Push, "#push_file(file_path)" do
39
39
  with_configuration do
40
40
  file = double('file')
41
41
  file_path = 'test_path'
42
- pusher.stub(:sanitize_file).and_return(file)
43
- pusher.should_receive(:api_call).with(
42
+ allow(pusher).to receive(:sanitize_file).and_return(file)
43
+ expect(pusher).to receive(:api_call).with(
44
44
  :import,
45
45
  :payload => { :file => file },
46
46
  :success => :report_success,
@@ -52,8 +52,8 @@ describe Localeapp::CLI::Push, "#push_file(file_path)" do
52
52
  end
53
53
 
54
54
  it "doesn't make the api call when the file doesn't exist" do
55
- pusher.stub(:sanitize_file).and_return(nil)
56
- pusher.should_not_receive(:api_call)
55
+ allow(pusher).to receive(:sanitize_file).and_return(nil)
56
+ expect(pusher).not_to receive(:api_call)
57
57
  pusher.push_file('foo')
58
58
  end
59
59
  end
@@ -12,7 +12,7 @@ describe Localeapp::CLI::Add, "#execute(current_name, new_name, *rest)" do
12
12
 
13
13
  it "makes the api call to the translations endpoint with the new name as the post body" do
14
14
  with_configuration do
15
- @command.should_receive(:api_call).with(
15
+ expect(@command).to receive(:api_call).with(
16
16
  :rename,
17
17
  :url_options => { :current_name => 'test.key' },
18
18
  :payload => { :new_name => 'test.new_name' },
@@ -6,32 +6,35 @@ describe Localeapp::CLI::Update, "#execute" do
6
6
  let(:updater) { Localeapp::CLI::Update.new(:output => output) }
7
7
  let(:poller) { Localeapp::Poller.new }
8
8
 
9
- before(:each) { Localeapp::Poller.stub(:new => poller) }
9
+ before do
10
+ poller
11
+ allow(Localeapp::Poller).to receive(:new) { poller }
12
+ end
10
13
 
11
14
  context "when timestamp is recent" do
12
- before(:each) { poller.stub(:updated_at => Time.now.to_i - 60) }
15
+ before { allow(poller).to receive(:updated_at) { Time.now.to_i - 60 } }
13
16
 
14
17
  it "creates a Poller and calls poll! on it" do
15
18
  with_configuration do
16
- poller.should_receive(:poll!)
19
+ expect(poller).to receive(:poll!)
17
20
  updater.execute
18
21
  end
19
22
  end
20
23
  end
21
24
 
22
25
  context "when timestamp is too old" do
23
- before(:each) { poller.stub(:updated_at => 0) }
26
+ before { allow(poller).to receive(:updated_at) { 0 } }
24
27
 
25
28
  it "warns the user" do
26
29
  with_configuration do
27
30
  updater.execute
28
- output.string.should include("Timestamp is missing or too old.")
31
+ expect(output.string).to include("Timestamp is missing or too old.")
29
32
  end
30
33
  end
31
34
 
32
35
  it "does not even call the API" do
33
36
  with_configuration do
34
- poller.should_not_receive(:poll!)
37
+ expect(poller).not_to receive(:poll!)
35
38
  updater.execute
36
39
  end
37
40
  end
@@ -4,7 +4,7 @@ describe Localeapp::Configuration do
4
4
  let(:configuration) { Localeapp::Configuration.new }
5
5
 
6
6
  it "sets the host by default" do
7
- configuration.host.should == 'api.localeapp.com'
7
+ expect(configuration.host).to eq('api.localeapp.com')
8
8
  end
9
9
 
10
10
  it "allows the host to be overwritten" do
@@ -12,7 +12,7 @@ describe Localeapp::Configuration do
12
12
  end
13
13
 
14
14
  it "sets proxy to nil by default" do
15
- configuration.proxy.should == nil
15
+ expect(configuration.proxy).to eq(nil)
16
16
  end
17
17
 
18
18
  it "allows proxy setting to be overridden" do
@@ -20,7 +20,7 @@ describe Localeapp::Configuration do
20
20
  end
21
21
 
22
22
  it "sets timeout to 60 by default" do
23
- configuration.timeout.should == 60
23
+ expect(configuration.timeout).to eq(60)
24
24
  end
25
25
 
26
26
  it "allows timeout setting to be overridden" do
@@ -28,7 +28,7 @@ describe Localeapp::Configuration do
28
28
  end
29
29
 
30
30
  it "sets secure to true by default" do
31
- configuration.secure.should == true
31
+ expect(configuration.secure).to eq(true)
32
32
  end
33
33
 
34
34
  it "allows secure setting to be overridden" do
@@ -36,11 +36,11 @@ describe Localeapp::Configuration do
36
36
  end
37
37
 
38
38
  it "sets ssl_verify to false by default" do
39
- configuration.ssl_verify.should == false
39
+ expect(configuration.ssl_verify).to eq(false)
40
40
  end
41
41
 
42
42
  it "sets ssl_version to 'SSLv23' by default" do
43
- configuration.ssl_version.should == 'SSLv23'
43
+ expect(configuration.ssl_version).to eq('SSLv23')
44
44
  end
45
45
 
46
46
  it "allows ssl_verify setting to be overridden" do
@@ -48,7 +48,7 @@ describe Localeapp::Configuration do
48
48
  end
49
49
 
50
50
  it "sets ssl_ca_file to nil by default" do
51
- configuration.ssl_ca_file.should == nil
51
+ expect(configuration.ssl_ca_file).to eq(nil)
52
52
  end
53
53
 
54
54
  it "allows ssl_ca_file setting to be overridden" do
@@ -56,25 +56,25 @@ describe Localeapp::Configuration do
56
56
  end
57
57
 
58
58
  it "includes http_auth_username defaulting to nil" do
59
- configuration.http_auth_username.should == nil
59
+ expect(configuration.http_auth_username).to eq(nil)
60
60
  configuration.http_auth_username = "test"
61
- configuration.http_auth_username.should == "test"
61
+ expect(configuration.http_auth_username).to eq("test")
62
62
  end
63
63
 
64
64
  it "includes http_auth_password defaulting to nil" do
65
- configuration.http_auth_password.should == nil
65
+ expect(configuration.http_auth_password).to eq(nil)
66
66
  configuration.http_auth_password = "test"
67
- configuration.http_auth_password.should == "test"
67
+ expect(configuration.http_auth_password).to eq("test")
68
68
  end
69
69
 
70
70
  it "includes translation_data_directory defaulting to config/locales" do
71
- configuration.translation_data_directory.should == File.join("config", "locales")
71
+ expect(configuration.translation_data_directory).to eq(File.join("config", "locales"))
72
72
  configuration.translation_data_directory = "test"
73
- configuration.translation_data_directory.should == "test"
73
+ expect(configuration.translation_data_directory).to eq("test")
74
74
  end
75
75
 
76
76
  it "sets the daemon_pid_file by default" do
77
- configuration.daemon_pid_file.should == 'tmp/pids/localeapp.pid'
77
+ expect(configuration.daemon_pid_file).to eq('tmp/pids/localeapp.pid')
78
78
  end
79
79
 
80
80
  it "allows the daemon_pid_file to be overwritten" do
@@ -82,7 +82,7 @@ describe Localeapp::Configuration do
82
82
  end
83
83
 
84
84
  it "sets the daemon_log_file by default" do
85
- configuration.daemon_log_file.should == 'log/localeapp_daemon.log'
85
+ expect(configuration.daemon_log_file).to eq('log/localeapp_daemon.log')
86
86
  end
87
87
 
88
88
  it "allows the daemon_log_file to be overwritten" do
@@ -95,19 +95,19 @@ describe Localeapp::Configuration do
95
95
 
96
96
  context "enabled_sending_environments" do
97
97
  it "is only development by default" do
98
- configuration.sending_environments.should == ['development']
98
+ expect(configuration.sending_environments).to eq(['development'])
99
99
  end
100
100
  end
101
101
 
102
102
  context "enabled_reloading_environments" do
103
103
  it "is only development by default" do
104
- configuration.reloading_environments.should == ['development']
104
+ expect(configuration.reloading_environments).to eq(['development'])
105
105
  end
106
106
  end
107
107
 
108
108
  context "enabled_polling_environments" do
109
109
  it "is only development by default" do
110
- configuration.polling_environments.should == ['development']
110
+ expect(configuration.polling_environments).to eq(['development'])
111
111
  end
112
112
  end
113
113
 
@@ -115,19 +115,19 @@ describe Localeapp::Configuration do
115
115
  it "is true when environment is not enabled" do
116
116
  configuration.polling_environments = %w(foo)
117
117
  configuration.environment_name = 'bar'
118
- configuration.should be_polling_disabled
118
+ expect(configuration).to be_polling_disabled
119
119
  end
120
120
 
121
121
  it "is false when environment is enabled" do
122
122
  configuration.polling_environments = %w(foo)
123
123
  configuration.environment_name = 'foo'
124
- configuration.should_not be_polling_disabled
124
+ expect(configuration).not_to be_polling_disabled
125
125
  end
126
126
 
127
127
  it "supports symbols in list of environments" do
128
128
  configuration.polling_environments = [:foo]
129
129
  configuration.environment_name = 'foo'
130
- configuration.should_not be_polling_disabled
130
+ expect(configuration).not_to be_polling_disabled
131
131
  end
132
132
  end
133
133
 
@@ -135,19 +135,19 @@ describe Localeapp::Configuration do
135
135
  it "is true when environment is not enabled" do
136
136
  configuration.reloading_environments = %w(foo)
137
137
  configuration.environment_name = 'bar'
138
- configuration.should be_reloading_disabled
138
+ expect(configuration).to be_reloading_disabled
139
139
  end
140
140
 
141
141
  it "is false when environment is enabled" do
142
142
  configuration.reloading_environments = %w(foo)
143
143
  configuration.environment_name = 'foo'
144
- configuration.should_not be_reloading_disabled
144
+ expect(configuration).not_to be_reloading_disabled
145
145
  end
146
146
 
147
147
  it "supports symbols in list of environments" do
148
148
  configuration.reloading_environments = [:foo]
149
149
  configuration.environment_name = 'foo'
150
- configuration.should_not be_reloading_disabled
150
+ expect(configuration).not_to be_reloading_disabled
151
151
  end
152
152
  end
153
153
 
@@ -155,19 +155,19 @@ describe Localeapp::Configuration do
155
155
  it "is true when environment is not enabled" do
156
156
  configuration.sending_environments = %w(foo)
157
157
  configuration.environment_name = 'bar'
158
- configuration.should be_sending_disabled
158
+ expect(configuration).to be_sending_disabled
159
159
  end
160
160
 
161
161
  it "is false when environment is enabled" do
162
162
  configuration.sending_environments = %w(foo)
163
163
  configuration.environment_name = 'foo'
164
- configuration.should_not be_sending_disabled
164
+ expect(configuration).not_to be_sending_disabled
165
165
  end
166
166
 
167
167
  it "supports symbols in the list of environments" do
168
168
  configuration.sending_environments = [:foo]
169
169
  configuration.environment_name = 'foo'
170
- configuration.should_not be_sending_disabled
170
+ expect(configuration).not_to be_sending_disabled
171
171
  end
172
172
  end
173
173
 
@@ -176,13 +176,13 @@ describe Localeapp::Configuration do
176
176
  context "when an api_key is defined" do
177
177
  it "returns true" do
178
178
  configuration.api_key = '0123456789abcdef'
179
- expect(configuration.has_api_key?).to be_true
179
+ expect(configuration.has_api_key?).to be true
180
180
  end
181
181
  end
182
182
 
183
183
  context "with no api_key provided" do
184
184
  it "returns false" do
185
- expect(configuration.has_api_key?).to be_false
185
+ expect(configuration.has_api_key?).to be false
186
186
  end
187
187
  end
188
188