Skip to content

Files

Latest commit

 

History

History
27 lines (19 loc) · 446 Bytes

RSpec-DescribedClassModuleWrapping.md

File metadata and controls

27 lines (19 loc) · 446 Bytes

Pattern: Opening module and defining spec within

Issue: -

Description

Avoid opening modules and defining specs within them.

Examples

# bad
module MyModule
  RSpec.describe MyClass do
    # ...
  end
end

# good
RSpec.describe MyModule::MyClass do
  # ...
end

Further Reading