summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-09-06 09:20:05 +1200
committerThong Kuah <tkuah@gitlab.com>2018-09-06 09:22:50 +1200
commit34f01b77d493905aa1f40b1d73a92a34465bdba8 (patch)
tree2191d7d578c081506c0ecd4cccef8ac0d5b424e7
parent0828361581fb095f262ec7b583042e7a2c12f9ae (diff)
downloadgitlab-ce-29398-support-kubernetes-rbac-for-gitlab-managed-apps.tar.gz
BE review: Don't mix un-named and name `it` in the same block.29398-support-kubernetes-rbac-for-gitlab-managed-apps
-rw-r--r--spec/lib/gitlab/kubernetes/kube_client_spec.rb21
1 files changed, 16 insertions, 5 deletions
diff --git a/spec/lib/gitlab/kubernetes/kube_client_spec.rb b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
index 30e79f94ab3..9146729d139 100644
--- a/spec/lib/gitlab/kubernetes/kube_client_spec.rb
+++ b/spec/lib/gitlab/kubernetes/kube_client_spec.rb
@@ -31,8 +31,13 @@ describe Gitlab::Kubernetes::KubeClient do
describe '#clients' do
subject { client.clients }
- it { is_expected.to be_present }
- it { is_expected.to all(be_an_instance_of Kubeclient::Client) }
+ it 'is not empty' do
+ is_expected.to be_present
+ end
+
+ it 'is an array of Kubeclient::Client objects' do
+ is_expected.to all(be_an_instance_of Kubeclient::Client)
+ end
it 'has each API group url' do
expected_urls = api_groups.map { |group| "#{api_url}/#{group}" }
@@ -56,7 +61,9 @@ describe Gitlab::Kubernetes::KubeClient do
describe '#core_client' do
subject { client.core_client }
- it { is_expected.to be_an_instance_of Kubeclient::Client }
+ it 'is a Kubeclient::Client' do
+ is_expected.to be_an_instance_of Kubeclient::Client
+ end
it 'has the core API endpoint' do
expect(subject.api_endpoint.to_s).to match(%r{\/api\Z})
@@ -66,7 +73,9 @@ describe Gitlab::Kubernetes::KubeClient do
describe '#rbac_client' do
subject { client.rbac_client }
- it { is_expected.to be_an_instance_of Kubeclient::Client }
+ it 'is a Kubeclient::Client' do
+ is_expected.to be_an_instance_of Kubeclient::Client
+ end
it 'has the RBAC API group endpoint' do
expect(subject.api_endpoint.to_s).to match(%r{\/apis\/rbac.authorization.k8s.io\Z})
@@ -78,7 +87,9 @@ describe Gitlab::Kubernetes::KubeClient do
let(:api_groups) { ['apis/extensions'] }
- it { is_expected.to be_an_instance_of Kubeclient::Client }
+ it 'is a Kubeclient::Client' do
+ is_expected.to be_an_instance_of Kubeclient::Client
+ end
it 'has the extensions API group endpoint' do
expect(subject.api_endpoint.to_s).to match(%r{\/apis\/extensions\Z})