spec/features/airbrake_expection_errors_feature_tests_spec.rb
Block has too many lines. [95/25] Open
Open
describe "Airbrake expection errors" do
before(:each) do
create(:assignment, name: "TestAssignment", directory_path: 'test_assignment')
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. [36/25] Open
Open
describe "airbrake-1517247902792549741" do
it "cannot access to '/tree_display/list' if not login" do
visit '/tree_display/list'
expect(page).to have_current_path('/auth/failure')
expect(page).not_to have_content('Manage content')
- 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
Open
create(:assignment_due_date, due_at: (DateTime.now.in_time_zone.in_time_zone + 1))
- 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)
Prefer Date or Time over DateTime. Open
Open
create(:assignment_due_date, deadline_type: DeadlineType.where(name: 'review').first, due_at: (DateTime.now.in_time_zone.in_time_zone + 5))
- 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)