diff options
author | syasonik <syasonik@gitlab.com> | 2019-05-22 14:55:59 +0100 |
---|---|---|
committer | syasonik <syasonik@gitlab.com> | 2019-05-29 10:53:34 +0100 |
commit | 2898e2c088254730fa839875d1571434c63cb455 (patch) | |
tree | 7ac3d7c4784b478cd9b3ed01fe338794740d55e6 | |
parent | a008e3727a30022e9a65e9479e9943fdc37d0a1a (diff) | |
download | gitlab-ce-2898e2c088254730fa839875d1571434c63cb455.tar.gz |
Use set instead of let and name subject
-rw-r--r-- | spec/helpers/environments_helper_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/helpers/environments_helper_spec.rb b/spec/helpers/environments_helper_spec.rb index 2d8529d4b94..0c8a8d2f032 100644 --- a/spec/helpers/environments_helper_spec.rb +++ b/spec/helpers/environments_helper_spec.rb @@ -3,9 +3,9 @@ require 'spec_helper' describe EnvironmentsHelper do - let(:environment) { create(:environment) } - let(:project) { environment.project } - let(:user) { create(:user) } + set(:environment) { create(:environment) } + set(:project) { environment.project } + set(:user) { create(:user) } describe '#metrics_data' do before do @@ -14,10 +14,10 @@ describe EnvironmentsHelper do allow(helper).to receive(:can?).and_return(true) end - subject { helper.metrics_data(project, environment) } + let(:metrics_data) { helper.metrics_data(project, environment) } it 'returns data' do - expect(subject).to include( + expect(metrics_data).to include( 'settings-path' => edit_project_service_path(project, 'prometheus'), 'clusters-path' => project_clusters_path(project), 'current-environment-name': environment.name, @@ -42,7 +42,7 @@ describe EnvironmentsHelper do end it 'adds external_dashboard_url' do - expect(subject['external-dashboard-url']).to eq('http://gitlab.com') + expect(metrics_data['external-dashboard-url']).to eq('http://gitlab.com') end end end |