diff options
Diffstat (limited to 'spec/services/ci/stop_environments_service_spec.rb')
-rw-r--r-- | spec/services/ci/stop_environments_service_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb index 23e0856fecd..560f83d94f7 100644 --- a/spec/services/ci/stop_environments_service_spec.rb +++ b/spec/services/ci/stop_environments_service_spec.rb @@ -44,8 +44,8 @@ describe Ci::StopEnvironmentsService, services: true do context 'when environment is not stopped' do before do - allow_any_instance_of(Environment). - to receive(:state).and_return(:stopped) + allow_any_instance_of(Environment) + .to receive(:state).and_return(:stopped) end it 'does not stop environment' do @@ -83,22 +83,22 @@ describe Ci::StopEnvironmentsService, services: true do context 'when environment does not exist' do it 'does not raise error' do - expect { service.execute('master') }. - not_to raise_error + expect { service.execute('master') } + .not_to raise_error end end end def expect_environment_stopped_on(branch) - expect_any_instance_of(Environment). - to receive(:stop!) + expect_any_instance_of(Environment) + .to receive(:stop!) service.execute(branch) end def expect_environment_not_stopped_on(branch) - expect_any_instance_of(Environment). - not_to receive(:stop!) + expect_any_instance_of(Environment) + .not_to receive(:stop!) service.execute(branch) end |