Skip to content

Commit 5fda5a1

Browse files
committed
Move let into private method in Updating a project spec
This value doesn't change in any of the contexts, so using a `let` block is of limited value. Also it will avoid triggering a violation of `RSpec/MultipleMemoizedHelpers` in a later commit.
1 parent 062d0e7 commit 5fda5a1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/features/project/updating_a_project_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require 'rails_helper'
44

55
RSpec.describe 'Updating a project', type: :request do
6-
let(:headers) { { Authorization: UserProfileMock::TOKEN } }
76
let(:project_type) { Project::Types::PYTHON }
87
let(:user_id) { owner.id }
98
let!(:project) { create(:project, name: 'Test Project', user_id:, locale: 'en', project_type:) }
@@ -78,4 +77,10 @@
7877
expect(data[:name]).to eq('Test Project')
7978
end
8079
end
80+
81+
private
82+
83+
def headers
84+
{ Authorization: UserProfileMock::TOKEN }
85+
end
8186
end

0 commit comments

Comments
 (0)