Autoformat code with rubocop

This commit is contained in:
Nelson Jovel 2022-03-04 15:29:54 +01:00
parent 68dde8a6ef
commit ed7a3b8a3d
43 changed files with 112 additions and 114 deletions

View file

@ -6,33 +6,33 @@ describe CategoryPresenter do
subcategory2 = Subcategory.create(name: 'Another subcategory', subcategory_id: '2')
category = Category.create(name: 'Some Category', subcategories: [subcategory1, subcategory2],
description: 'A description for some Category', short_description: 'A short description for some Category', category_id: '1')
return CategoryPresenter.new(category: category)
description: 'A description for some Category', short_description: 'A short description for some Category', category_id: '1')
return CategoryPresenter.new(category:)
end
let(:teachers_and_leadership_presenter) do
category = create(:category, name: 'Teachers & Leadership')
return CategoryPresenter.new(category: category)
return CategoryPresenter.new(category:)
end
let(:school_culture_presenter) do
category = create(:category, name: 'School Culture')
return CategoryPresenter.new(category: category)
return CategoryPresenter.new(category:)
end
let(:resources_presenter) do
category = create(:category, name: 'Resources')
return CategoryPresenter.new(category: category)
return CategoryPresenter.new(category:)
end
let(:academic_learning_presenter) do
category = create(:category, name: 'Academic Learning')
return CategoryPresenter.new(category: category)
return CategoryPresenter.new(category:)
end
let(:community_and_wellbeing_presenter) do
category = create(:category, name: 'Community & Wellbeing')
return CategoryPresenter.new(category: category)
return CategoryPresenter.new(category:)
end
after :each do

View file

@ -11,7 +11,7 @@ describe GaugePresenter do
end
let(:score) { 3 }
let(:gauge_presenter) { GaugePresenter.new(zones: zones, score: score) }
let(:gauge_presenter) { GaugePresenter.new(zones:, score:) }
it 'returns the key benchmark percentage for the gauge' do
expect(gauge_presenter.key_benchmark_percentage).to eq 0.625

View file

@ -10,7 +10,7 @@ describe SubcategoryCardPresenter do
)
end
let(:subcategory_card_presenter) { SubcategoryCardPresenter.new(name: 'Card name', zones: zones, score: score) }
let(:subcategory_card_presenter) { SubcategoryCardPresenter.new(name: 'Card name', zones:, score:) }
context 'when the given score is in the Warning zone for the given scale' do
let(:score) { 1 }

View file

@ -68,11 +68,11 @@ describe SubcategoryPresenter do
end
it 'returns the student response rate' do
expect(subcategory_presenter.student_response_rate).to eq "25%"
expect(subcategory_presenter.student_response_rate).to eq '25%'
end
it 'returns the teacher response rate' do
expect(subcategory_presenter.teacher_response_rate).to eq "50%"
expect(subcategory_presenter.teacher_response_rate).to eq '50%'
end
it 'returns the admin collection rate' do