Dalphi/dalphi

View on GitHub
spec/requests/smoke_test_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [32/25]
Open

RSpec.describe "GET routes", type: :request do
  before(:each) do
    @annotation_document = FactoryGirl.create :annotation_document
    @statistic = FactoryGirl.create :statistic
    @raw_datum = @annotation_document.raw_datum
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

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 single-quoted strings when you don't need string interpolation or special symbols.
Open

RSpec.describe "GET routes", type: :request do
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

%W-literals should be delimited by [ and ].
Open

    method = %W{ GET POST PUT PATCH DELETE }.grep(route.verb).first
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

This cop enforces the consistent usage of %-literal delimiters.

Specify the 'default' key to set all preferred delimiters at once. You can continue to specify individual preferred delimiters to override the default.

Example:

# Style/PercentLiteralDelimiters:
#   PreferredDelimiters:
#     default: '[]'
#     '%i':    '()'

# good
%w[alpha beta] + %i(gamma delta)

# bad
%W(alpha #{beta})

# bad
%I(alpha beta)

Line is too long. [91/80]
Open

    path = route.path.spec.to_s.gsub(/\(\.:format\)/, '').gsub(/:([a-zA-Z]+_){0,1}id/, '1')
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

Do not use %W unless interpolation is needed. If not, use %w.
Open

    method = %W{ GET POST PUT PATCH DELETE }.grep(route.verb).first
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

This cop checks for usage of the %W() syntax when %w() would do.

Example:

# bad
%W(cat dog pig)
%W[door wall floor]

# good
%w/swim run bike/
%w[shirt pants shoes]
%W(apple #{fruit} grape)

Do not use spaces inside percent literal delimiters.
Open

    method = %W{ GET POST PUT PATCH DELETE }.grep(route.verb).first
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

Checks for unnecessary additional spaces inside the delimiters of %i/%w/%x literals.

Example:

# good
%i(foo bar baz)

# bad
%w( foo bar baz )

# bad
%x(  ls -l )

Do not use spaces inside percent literal delimiters.
Open

    method = %W{ GET POST PUT PATCH DELETE }.grep(route.verb).first
Severity: Minor
Found in spec/requests/smoke_test_spec.rb by rubocop

Checks for unnecessary additional spaces inside the delimiters of %i/%w/%x literals.

Example:

# good
%i(foo bar baz)

# bad
%w( foo bar baz )

# bad
%x(  ls -l )

There are no issues that match your filters.

Category
Status