decko-commons/decko

View on GitHub

Showing 661 of 695 total issues

Start context description with 'when', 'with', or 'without'.
Open

  context "updating" do

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.image.url)

Name your test subject if you need to reference it explicitly.
Open

          .to eq "~#{subject.id}/#{subject.last_action_id}.txt"

Empty example group detected.
Open

describe Card::Set::Right::Read do

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.image.icon.size).to be < 3000

Name your test subject if you need to reference it explicitly.
Open

      medium_path = subject.image.medium.path

Name your test subject if you need to reference it explicitly.
Open

      subject.delete_files_for_action(subject.last_action)

Use let instead of an instance variable.
Open

      Card.new(@args).item_names(item_names_args)

Empty example group detected.
Open

RSpec.describe Card::Set::Right::Following do

include is used at the top level. Use inside class or module.
Open

include Abstract::Permission
Severity: Minor
Found in mod/permissions/set/right/read.rb by rubocop

This cop checks that include, extend and prepend exists at the top level. Using these at the top level affects the behavior of Object. There will not be using include, extend and prepend at the top level. Let's use it inside class or module.

Example:

# bad
include M

class C
end

# bad
extend M

class C
end

# bad
prepend M

class C
end

# good
class C
  include M
end

# good
class C
  extend M
end

# good
class C
  prepend M
end

include is used at the top level. Use inside class or module.
Open

include File::SelectedAction
Severity: Minor
Found in mod/carrierwave/set/type/image.rb by rubocop

This cop checks that include, extend and prepend exists at the top level. Using these at the top level affects the behavior of Object. There will not be using include, extend and prepend at the top level. Let's use it inside class or module.

Example:

# bad
include M

class C
end

# bad
extend M

class C
end

# bad
prepend M

class C
end

# good
class C
  include M
end

# good
class C
  extend M
end

# good
class C
  prepend M
end

Start context description with 'when', 'with', or 'without'.
Open

    context "storage type: protected" do

Start context description with 'when', 'with', or 'without'.
Open

    context "storage type: unprotected" do

Name your test subject if you need to reference it explicitly.
Open

          subject

Name your test subject if you need to reference it explicitly.
Open

        .to eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.image.icon.size).to be_positive

Name your test subject if you need to reference it explicitly.
Open

        .to eq "/files/~#{subject.id}/#{subject.last_action_id}-original.jpg"

Name your test subject if you need to reference it explicitly.
Open

      expect(subject.image.size).to be_positive

Name your test subject if you need to reference it explicitly.
Open

          .to eq "/files/:#{subject.codename}/bootstrap-medium.png"

Name your test subject if you need to reference it explicitly.
Open

          .to eq "~#{subject.id}/#{subject.last_action_id}.txt"
Severity
Category
Status
Source
Language