Skip to content

Improve MR feature specs and reduce duplication

Rémy Coutable requested to merge rc/improve-mr-feature-specs into master

What does this MR do?

In this MR:

  • Better organization of files:
    • spec/features/merge_request/ => single MR scenarios
    • spec/features/merge_requests/ => MRs list scenarios
  • Better file naming: <actor>_<action>_spec.rb
  • Better feature title, e.g. "Merge request > User sees merge widget"
  • Usage of RSpec's default DSL: describe, let, before, it
  • Removal of wrong-level assertions, e.g. expect_tokens
  • Grouping of multiple it
  • Extraction of shared behaviors to 2 new shared examples files

Next steps:

  • Migrate features/project/merge_requests.feature to RSpec
    • Take the opportunity to remove duplicate scenarios
  • Further streamline redundant specs in spec/features/merge_request/ and spec/features/merge_requests/
  • Apply the same rules and refactoring to other feature specs
  • Use spec/features/merge_request/ and spec/features/merge_requests/ as examples of good practices
Edited by Rémy Coutable

Merge request reports