Skip to content

Add rubocop rule to catch misplaced specs for ee extensions

Description of the proposal

Add rubocop rule to catch misplaced specs for ee extensions

        # Checks EE spec files for misplaced EE spec files
        # in ee/spec/ (but not in ee/spec/*/ee/) should have matching application files.
        # See https://docs.gitlab.com/development/ee_features/#testing-ee-features-based-on-ce-features.
        #
        # @example
        #   # bad
        #   ee/spec/models/my_model_spec.rb      # When an existing prepended module ee/app/models/ee/my_model.rb
        #
        #   # good
        #   ee/spec/models/my_model_spec.rb      # With matching ee/app/models/my_model.rb
        #   ee/spec/models/ee/my_model_spec.rb   # EE extension specs can have added functionality
        #                                          without a matching application file
        #

Check-list

Edited by Doug Stull

Merge request reports

Loading