Block has too many lines. [243/25] Open
describe GradesHelper, type: :helper do
let(:review_response) { build(:response, id: 1, map_id: 1) }
let(:question) { build(:question) }
let(:participant) { build(:participant, id: 1, assignment: assignment, user_id: 1, parent_id: 1) }
let(:team) { build(:assignment_team, id: 1) }
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [40/25] Open
describe 'has_team_and_metareview' do
context 'when query assignment is individual work and does not have metareview' do
it 'return true_num with 0' do
params = { action: 'view', id: 1 }
# set the params variable in function has_team_and_metareview
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [30/25] Open
describe 'view_heatgrid' do
context 'when all questionnaires do not match the target type' do
it 'render the view with empty list of VmQuestionResponse' do
# mock the participant for the AssignmentParticipant.find
allow(AssignmentParticipant).to receive(:find).with(1).and_return(assignment_participant)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe 'type_and_max' do
context 'when the question is a Checkbox' do
it 'returns 10_003' do
row = VmQuestionResponseRow.new('Some question text', 1, 5, 95, 2)
allow(Question).to receive(:find).with(1).and_return(question)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Operator ==
used in void context. Open
question[:type] == 'NotACheckbox'
- Read upRead up
- Exclude checks
This cop checks for operators, variables and literals used in void context.
Example:
# bad
def some_method
some_num * 10
do_something
end
Example:
# bad
def some_method(some_var)
some_var
do_something
end
Example:
# good
def some_method
do_something
some_num * 10
end
Example:
# good
def some_method(some_var)
do_something
some_var
end