mod/bootstrap/spec/bootstrap_builder_spec.rb
Put prepend
mixins in separate statements. Open
Open
prepend { tag :prepend, "prepend-class" }
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop checks for grouping of mixins in class
and module
bodies.
By default it enforces mixins to be placed in separate declarations,
but it can be configured to enforce grouping them in one declaration.
Example: EnforcedStyle: separated (default)
# bad
class Foo
include Bar, Qox
end
# good
class Foo
include Qox
include Bar
end
Example: EnforcedStyle: grouped
# bad
class Foo
extend Bar
extend Qox
end
# good
class Foo
extend Qox, Bar
end
Missing top-level class documentation comment. Open
Open
class BuilderTest < Card::Bootstrap::Component
- 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
The second argument to describe should be the method being tested. '#instance' or '.class'. Open
Open
RSpec.describe Card::Bootstrap, "builder" do
- Create a ticketCreate a ticket
- Exclude checks