Block has too many lines. [208/25] Open
describe 'Assignment Topic Suggestion Test' do
before(:each) do
create(:assignment, name: 'Assignment_suggest_topic', allow_suggestions: true)
create_list(:participant, 3)
create(:assignment_node)
- 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. [190/25] Open
describe 'topic_suggestion' do
it 'Instructor set an assignment which allow student suggest topic and register student2065' do
# login as student2065, Note by Xing Pan: modify spec/factories/factories.rb to generate student11 and call "create student" at beginning
user = User.find_by(name: 'student2064')
# stub_current_user(user, user.role.name, user.role)
- 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. [71/25] Open
it ' student2064 hold suggest topic and suggest a new one and student2065 enroll on waitlist of suggested topic', js: true do
# login_as "student2064"
user = User.find_by(name: 'student2064')
login_as(user.name)
visit '/student_task/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.
Block has too many lines. [68/25] Open
it 'student2065 hold suggest topic and suggest a new one, but wish to stay in the old topic', js: true do
# login_as "student2065"
user = User.find_by(name: 'student2065')
login_as(user.name)
visit '/student_task/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.
Prefer Date or Time over DateTime. Open
create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: DateTime.now.in_time_zone + 2.days)
- Read upRead up
- Exclude checks
This cop checks for uses of DateTime
that should be replaced by
Date
or Time
.
Example:
# bad - uses `DateTime` for current time
DateTime.now
# good - uses `Time` for current time
Time.now
# bad - uses `DateTime` for modern date
DateTime.iso8601('2016-06-29')
# good - uses `Date` for modern date
Date.iso8601('2016-06-29')
# good - uses `DateTime` with start argument for historical date
DateTime.iso8601('1751-04-23', Date::ENGLAND)