Showing 661 of 695 total issues
Name your test subject if you need to reference it explicitly. Open
.to eq("/files/~#{subject.id}/#{subject.last_action_id}-medium.jpg")
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
expect(subject.image.size).to eq 8533
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
.to eq "/files/~#{subject.id}/#{subject.last_action_id}-original.gif"
- Create a ticketCreate a ticket
- Exclude checks
Start context description with 'when', 'with', or 'without'. Open
context "coded file" do
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class Layout
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
Use caller_locations(3..3).first
instead of caller_locations[2]
. Open
base_path = locals.delete(:template_path) || caller_locations[2].path
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop identifies places where caller[n]
can be replaced by caller(n..n).first
.
Example:
# bad
caller[1]
caller.first
caller_locations[1]
caller_locations.first
# good
caller(2..2).first
caller(1..1).first
caller_locations(2..2).first
caller_locations(1..1).first
Name your test subject if you need to reference it explicitly. Open
expect(subject.file.read.strip).to eq "file2"
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
.to eq "/files/~#{subject.id}/#{subject.last_action_id}.txt"
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
Card["#{subject.name}+*self+*read"].delete
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
expect(subject.image.url)
- Create a ticketCreate a ticket
- Exclude checks
Empty example group detected. Open
context "when admin is following" do
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class Bootstrap
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
Missing top-level module documentation comment. Open
module Delegate
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
Missing top-level class documentation comment. Open
class Panel < OldComponent
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
Missing top-level class documentation comment. Open
class Link < Reference
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for missing top-level documentation of classes and modules. Classes with no body are exempt from the check and so are namespace modules - modules that have nothing in their bodies except classes, other modules, or constant definitions.
The documentation requirement is annulled if the class or module has a "#:nodoc:" comment next to it. Likewise, "#:nodoc: all" does the same for all its children.
Example:
# bad
class Person
# ...
end
# good
# Description/Explanation of Person class
class Person
# ...
end
When using method_missing
, fall back on super
. Open
def method_missing method_name, *args, &block
if block_given?
@format.send(method_name, *args, &block)
else
@format.send(method_name, *args)
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for the presence of method_missing
without also
defining respond_to_missing?
and falling back on super
.
Example:
#bad
def method_missing(name, *args)
# ...
end
#good
def respond_to_missing?(name, include_private)
# ...
end
def method_missing(name, *args)
# ...
super
end
Use let
instead of an instance variable. Open
described_class.new(described_class.full_match(@chunk), nil)
- Create a ticketCreate a ticket
- Exclude checks
Start context description with 'when', 'with', or 'without'. Open
context "references" do
- Create a ticketCreate a ticket
- Exclude checks
Replace class var @@options with a class instance var. Open
@@options = {
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for uses of class variables. Offenses are signaled only on assignment to class variables to reduce the number of offenses that would be reported.
Use let
instead of an instance variable. Open
expect(@hat.type_name).to eq("Hat")
- Create a ticketCreate a ticket
- Exclude checks