Skip to content

Use `test-prof`'s `let_it_be` instead of `rspec-set`

The following discussion from gitlab-ce!27050 should be addressed:

@engwan started a discussion: (+1 comment)

> Another consideration is to use this instead: https://test-prof.evilmartians.io/#/let_it_be
> 
> We already have the `test-prof` gem anyway. And this allows us to choose between `reload` and `refind` strategies. That can be useful in cases where a `reload` isn't good enough.

let_it_be is preferable to set because it is available within nested contexts and cleanup is handled automatically using a transaction rollback.

Proposal

  • Update gem and include let_it_be / before_all. Update development documentation to deprecate use of rspec-set.
  • Switch usage from set to let_it_be in batches
  • Remove rspec-set gem and remove cleanup in after(:context)
Edited by Peter Leitzen