spec/models/quiz_assignment_spec.rb
Block has too many lines. [84/25] Open
Open
describe QuizAssignment do
let(:assignment) { build(:assignment, id: 1, name: 'no assignment', participants: [participant], teams: [team]) }
let(:instructor) { build(:instructor, id: 6) }
let(:student) { build(:student, id: 3, name: 'no one') }
let(:participant) { build(:participant, 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
Open
describe '#contributor_for_quiz' do
context 'when no topic is selected' do
it 'raises an error' do
assignment.sign_up_topics << topic
expect { assignment.contributor_for_quiz(participant, nil) }.to raise_error('Please select a topic.')
- 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.