Refactor wiki model specs to avoid using instance variables
Summary
The following discussion from !27428 (merged) should be addressed:
-
@.luke started a discussion: (+1 comment) 🤔 The#delete_page
and#update_page
specs are ported from older specs. Is it worth creating a follow-up issue to look at whether we can avoid instance variables in these tests? I think I would prefer that not to happen in this MR, as being able to see the clean porting of the code gives a reviewer confidence that what once worked will still work again.
Improvements
Replace instance variables with let
bindings.
We did a similar refactor for the WikiPage
specs in !24364 (merged).
Involved components
spec/support/shared_examples/models/wiki_shared_examples.rb