ptomulik/puppet-portsng

View on GitHub
spec/spec_helper_acceptance.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

RSpec.configure do |c|
  # Project root
  proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))

  # Readable test descriptions
Severity: Minor
Found in spec/spec_helper_acceptance.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.

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

      moddeps = %w(portsutil backports)
Severity: Minor
Found in spec/spec_helper_acceptance.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)

Ternary operators must not be nested. Prefer if or else constructs instead.
Open

                     (host['platform'] =~ /10\.[0-4]/ ? 'puppet4' : 'puppet5')
Severity: Minor
Found in spec/spec_helper_acceptance.rb by rubocop

Avoid multi-line ternary operators, use if or unless instead.
Open

    default_puppet = host['platform'] =~ /9\.[0-1]/ ? 'puppet' :
                     (host['platform'] =~ /10\.[0-4]/ ? 'puppet4' : 'puppet5')
Severity: Minor
Found in spec/spec_helper_acceptance.rb by rubocop

This cop checks for multi-line ternary op expressions.

Example:

# bad
a = cond ?
  b : c
a = cond ? b :
    c
a = cond ?
    b :
    c

# good
a = cond ? b : c
a =
  if cond
    b
  else
    c
  end

There are no issues that match your filters.

Category
Status