Address rspec deprecation warnings relating to stubbing