Skip to content

Improve MR feature specs and reduce duplication

username-removed-128633 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 scenari
    • spec/features/merge_requests/ => MRs list scenari
  • 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 scenari
  • 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 username-removed-128633

Merge request reports

Loading