Showing 661 of 695 total issues
Start context description with 'when', 'with', or 'without'. Open
context "updated file card" do
- 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 6836
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
expect(subject.image.small.size).to be < 6000
- 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
Use let
instead of an instance variable. Open
item_names_args = @context ? { context: @context } : {}
- Create a ticketCreate a ticket
- Exclude checks
Empty example group detected. Open
describe Card::Set::Self::Alerts do
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class StopFollowLink < FollowLink
- 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
Prefer annotated tokens (like %<foo>s</foo>
) over unannotated tokens (like %s
). Open
"%s/%s/%s" % [local_url_base(opts), file_dir, full_filename(url_filename)]
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
Use a consistent style for named format string tokens.
Note:
unannotated
style cop only works for strings
which are passed as arguments to those methods:
sprintf
, format
, %
.
The reason is that unannotated format is very similar
to encoded URLs or Date/Time formatting strings.
Example: EnforcedStyle: annotated (default)
# bad
format('%{greeting}', greeting: 'Hello')
format('%s', 'Hello')
# good
format('%<greeting>s', greeting: 'Hello')</greeting>
Example: EnforcedStyle: template
# bad
format('%<greeting>s', greeting: 'Hello')
format('%s', 'Hello')
# good
format('%{greeting}', greeting: 'Hello')</greeting>
Example: EnforcedStyle: unannotated
# bad
format('%<greeting>s', greeting: 'Hello')
format('%{greeting}', 'Hello')
# good
format('%s', 'Hello')</greeting>
Name your test subject if you need to reference it explicitly. Open
expect(File).to be_exist(subject.file.path)
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
expect(subject.file.url)
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
.to eq "~#{subject.id}/#{subject.last_action_id}.jpg"
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
act_summary = subject.format.render_content_changes
- Create a ticketCreate a ticket
- Exclude checks
Name your test subject if you need to reference it explicitly. Open
expect(subject.image.original_filename).to eq "rails.gif"
- 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
The first argument to describe should be the class or module being tested. Open
describe "#bucket config" do
- Create a ticketCreate a ticket
- Exclude checks
Missing top-level class documentation comment. Open
class ProcLayout < 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
Missing top-level class documentation comment. Open
class UnknownLayout < 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
Do not stub your test subject. Open
allow(format).to receive(:view_setting)
- Create a ticketCreate a ticket
- Exclude checks
Script file stop_follow_link.rb doesn't have execute permission. Open
#! no set module
- Create a ticketCreate a ticket
- Exclude checks
Use let
instead of an instance variable. Open
@account.password_card.update!(content: "new Pas5word!")
- Create a ticketCreate a ticket
- Exclude checks