spec/requests/projects/update_spec.rb
Block has too many lines. [35/25] Open
Open
RSpec.describe 'Project update', type: :request do
before(:each) do
@project = FactoryGirl.create(:project)
@interface = FactoryGirl.create(:interface)
sign_in(@project.admin)
- 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 to_s
over string interpolation. Open
Open
"#{@interface}" => @interface.id
- Read upRead up
- Exclude checks
This cop checks for strings that are just an interpolated expression.
Example:
# bad
"#{@var}"
# good
@var.to_s
# good if @var is already a String
@var
Line is too long. [83/80] Open
Open
expect(project.description).to eq('super up-to-date, you will not believe it!')
- Exclude checks
Avoid comma after the last item of a hash. Open
Open
},
- Read upRead up
- Exclude checks
This cop checks for trailing comma in array and hash literals.
Example: EnforcedStyleForMultiline: consistent_comma
# bad
a = [1, 2,]
# good
a = [
1, 2,
3,
]
# good
a = [
1,
2,
]
Example: EnforcedStyleForMultiline: comma
# bad
a = [1, 2,]
# good
a = [
1,
2,
]
Example: EnforcedStyleForMultiline: no_comma (default)
# bad
a = [1, 2,]
# good
a = [
1,
2
]