koraktor/gallerist

View on GitHub
spec/gallerist/multi_tag_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

describe MultiTag do

  let(:library) { double }
  let(:tag_names) { %w{tag-1 tag2} }

Severity: Minor
Found in spec/gallerist/multi_tag_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.

Extra empty line detected at block body end.
Open


  end
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Do not use space inside array brackets.
Open

    allow(tags).to receive(:where).with(simple_name: tag_names) { [ tag1, tag2 ] }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Do not use space inside array brackets.
Open

    allow(tags).to receive(:where).with(simple_name: tag_names) { [ tag1, tag2 ] }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Line is too long. [100/80]
Open

      allow(tagged_photos).to receive(:having).with('count(versionId) = ?', 2) { all_tagged_photos }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Line is too long. [87/80]
Open

      allow(tag_photos).to receive(:group).with(:keywordId, :versionId) { unique_tags }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Extra empty line detected at block body beginning.
Open


    let(:all_tagged_photos) { double }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Line is too long. [106/80]
Open

    allow(tag_photos).to receive(:where).with(RKKeywordForVersion: { keywordId: [ tag1.id, tag2.id ] }) do
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Extra empty line detected at block body end.
Open


end
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

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

  let(:tag_names) { %w{tag-1 tag2} }
Severity: Minor
Found in spec/gallerist/multi_tag_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)

Do not use space inside array brackets.
Open

    allow(tag_photos).to receive(:where).with(RKKeywordForVersion: { keywordId: [ tag1.id, tag2.id ] }) do
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Line is too long. [82/80]
Open

    allow(tags).to receive(:where).with(simple_name: tag_names) { [ tag1, tag2 ] }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Extra empty line detected at block body beginning.
Open


  let(:library) { double }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Extra empty line detected at block body beginning.
Open


    let(:all_tagged_photos) { double }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Extra empty line detected at block body end.
Open


  end
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

This cops checks if empty lines around the bodies of blocks match the configuration.

Example: EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Example: EnforcedStyle: noemptylines (default)

# good

foo do |bar|
  # ...
end

Do not use space inside array brackets.
Open

    allow(tag_photos).to receive(:where).with(RKKeywordForVersion: { keywordId: [ tag1.id, tag2.id ] }) do
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

Checks that brackets used for array literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that array literals have
# surrounding space.

# bad
array = [a, b, c, d]

# good
array = [ a, b, c, d ]

Example: EnforcedStyle: no_space

# The `no_space` style enforces that array literals have
# no surrounding space.

# bad
array = [ a, b, c, d ]

# good
array = [a, b, c, d]

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# array brackets, with the exception that successive left
# or right brackets are collapsed together in nested arrays.

# bad
array = [ a, [ b, c ] ]

# good
array = [ a, [ b, c ]]

Line is too long. [115/80]
Open

      allow(tagged_photos).to receive(:where).with(RKKeywordForVersion: { modelId: unique_tags }) { tagged_photos }
Severity: Minor
Found in spec/gallerist/multi_tag_spec.rb by rubocop

There are no issues that match your filters.

Category
Status