diff --git a/spec/models/clusters/applications/runner_spec.rb b/spec/models/clusters/applications/runner_spec.rb index 5f2c723d483..3ef59457c5f 100644 --- a/spec/models/clusters/applications/runner_spec.rb +++ b/spec/models/clusters/applications/runner_spec.rb @@ -55,13 +55,9 @@ describe Clusters::Applications::Runner do context 'without a runner' do let(:project) { create(:project) } - let(:cluster) { create(:cluster) } + let(:cluster) { create(:cluster, projects: [project]) } let(:gitlab_runner) { create(:clusters_applications_runner, cluster: cluster) } - before do - cluster.projects << project - end - it 'creates a runner' do expect do subject