Skip to content

Files

Latest commit

 

History

History
30 lines (19 loc) · 669 Bytes

Airbnb-RspecDescribeOrContextUnderNamespace.md

File metadata and controls

30 lines (19 loc) · 669 Bytes

Pattern: Use of describe/context under namespace

Issue: -

Description

Checks for Rspec describe or context method calls under a namespace. It can potentially cause autoloading to occur in a different order than it would have in development or production. This could cause flaky tests.

Examples

# bad

# spec/foo/bar_spec.rb
module Foo
  describe Bar do
  end
end

# good

# spec/foo/bar_spec.rb do

describe Foo::Bar
end

Further Reading