diff options
author | João Cunha <j.a.cunha@gmail.com> | 2019-02-26 16:44:31 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-02-26 16:44:31 +0000 |
commit | 4c974f50f6e85165f9750cc42760e4a2fbd81e6f (patch) | |
tree | a856956ba1072007ba5ddce36b10ef2b8e808a63 /spec/lib/gitlab/profiler_spec.rb | |
parent | b7a3c8f6404ba2890409e0e79697fa34354cf46e (diff) | |
download | gitlab-ce-4c974f50f6e85165f9750cc42760e4a2fbd81e6f.tar.gz |
Get rid of ScheduleInstallationService
- deletes schedule_installation_service.rb
- moves schedule_installation_service.rb logic to create_service.rb
- moves specs as well
Removes code duplication
Remove unecessary spec block
Abide review suggestions
Test installable applications which are not associated to a cluster
Fix a typo
Removes duplciated expectation
Reuse variable instead of redefining
Remove method in favor of a local scoped lambda
Improve 'failing service' shared examples
Test the increase of status count
Remove duplicated test
Enable fronzen literal
Diffstat (limited to 'spec/lib/gitlab/profiler_spec.rb')
-rw-r--r-- | spec/lib/gitlab/profiler_spec.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/spec/lib/gitlab/profiler_spec.rb b/spec/lib/gitlab/profiler_spec.rb index 8bb0c1a0b8a..9f2214f7ce7 100644 --- a/spec/lib/gitlab/profiler_spec.rb +++ b/spec/lib/gitlab/profiler_spec.rb @@ -1,8 +1,6 @@ require 'spec_helper' describe Gitlab::Profiler do - RSpec::Matchers.define_negated_matcher :not_change, :change - let(:null_logger) { Logger.new('/dev/null') } let(:private_token) { 'private' } @@ -187,7 +185,7 @@ describe Gitlab::Profiler do end it 'does not modify the standard Rails loggers' do - expect { described_class.with_custom_logger(nil) { } } + expect { described_class.with_custom_logger(nil) {} } .to not_change { ActiveRecord::Base.logger } .and not_change { ActionController::Base.logger } .and not_change { ActiveSupport::LogSubscriber.colorize_logging } @@ -204,7 +202,7 @@ describe Gitlab::Profiler do end it 'cleans up ApplicationController afterwards' do - expect { described_class.with_user(user) { } } + expect { described_class.with_user(user) {} } .to not_change { ActionController.instance_methods(false) } end end @@ -213,7 +211,7 @@ describe Gitlab::Profiler do it 'does not define methods on ApplicationController' do expect(ApplicationController).not_to receive(:define_method) - described_class.with_user(nil) { } + described_class.with_user(nil) {} end end end |