Use new rspec syntax for hierarchy service spec
These turn into failures if run the specs with Ruby 3
We are running a pipeline with Ruby 3, and recently updated rspec-mocks. To get these specs to pass we should use the syntax in this MR .
Similar to !86157 (merged)
Related to #362486 (closed)
Edited by Roy Zwambag