spec/models/student_task_spec.rb
Block has too many lines. [313/25] Open
Open
describe StudentTask do
# Write your mocked object here!
let(:participant) { build(:participant, id: 1, user_id: user.id, parent_id: assignment.id) }
let(:participant2) { build(:participant, id: 2, user_id: user2.id, parent_id: assignment.id) }
let(:user) { create(:student) }
- 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.
File student_task_spec.rb
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
describe StudentTask do
# Write your mocked object here!
let(:participant) { build(:participant, id: 1, user_id: user.id, parent_id: assignment.id) }
let(:participant2) { build(:participant, id: 2, user_id: user2.id, parent_id: assignment.id) }
let(:user) { create(:student) }
Block has too many lines. [36/25] Open
Open
describe '#get_submission_data' do
context 'when no submission data mapped' do
it 'returns nil' do
timeline_list = []
expect(StudentTask.get_submission_data(1, 1, timeline_list)).to eq(nil)
- 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. [31/25] Open
Open
describe '#get_due_date_data' do
context 'when called with assignment having empty due dates' do
it 'return empty time_list array' do
timeline_list = []
StudentTask.get_due_date_data(assignment, timeline_list)
- 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.