diff options
author | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-04 19:11:39 +0300 |
---|---|---|
committer | Pawel Chojnacki <pawel@chojnacki.ws> | 2018-01-04 19:11:39 +0300 |
commit | 57c1f7cae09fe60a4be8d99b64833779476f402d (patch) | |
tree | bdf2ac73f3df83f06e96ec54d5c60a5797959fbd /spec/models | |
parent | 09473b192c70ada66148dace8c6196ccabfa1dd9 (diff) |
Fix rubocop warnings
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/clusters/applications/prometheus_spec.rb | 17 | ||||
-rw-r--r-- | spec/models/project_services/prometheus_service_spec.rb | 4 |
2 files changed, 12 insertions, 9 deletions
diff --git a/spec/models/clusters/applications/prometheus_spec.rb b/spec/models/clusters/applications/prometheus_spec.rb index 1fdfb262618..1102249493c 100644 --- a/spec/models/clusters/applications/prometheus_spec.rb +++ b/spec/models/clusters/applications/prometheus_spec.rb @@ -51,13 +51,16 @@ describe Clusters::Applications::Prometheus do context 'cluster has kubeclient' do let(:kubernetes_url) { 'http://example.com' } - let(:k8s_discover_response) { { - resources: [ - { - name: 'service', - kind: 'Service' - }] - } } + let(:k8s_discover_response) do + { + resources: [ + { + name: 'service', + kind: 'Service' + } + ] + } + end let(:kube_client) { Kubeclient::Client.new(kubernetes_url) } diff --git a/spec/models/project_services/prometheus_service_spec.rb b/spec/models/project_services/prometheus_service_spec.rb index aff03e28cc4..789846250ad 100644 --- a/spec/models/project_services/prometheus_service_spec.rb +++ b/spec/models/project_services/prometheus_service_spec.rb @@ -205,7 +205,7 @@ describe PrometheusService, :use_clean_rails_memory_store_caching do context 'with cluster for all environments without prometheus installed' do context 'without environment supplied' do it 'raises PrometheusError because cluster was not found' do - expect{service.client}.to raise_error(Gitlab::PrometheusError, /couldn't find cluster with Prometheus installed/) + expect { service.client }.to raise_error(Gitlab::PrometheusError, /couldn't find cluster with Prometheus installed/) end end @@ -224,7 +224,7 @@ describe PrometheusService, :use_clean_rails_memory_store_caching do let!(:environment) { create(:environment, project: project, name: 'prod') } it 'raises PrometheusError because cluster was not found' do - expect{service.client}.to raise_error(Gitlab::PrometheusError, /couldn't find cluster with Prometheus installed/) + expect { service.client }.to raise_error(Gitlab::PrometheusError, /couldn't find cluster with Prometheus installed/) end end end |