Using double to create a stub to remove depreaction warning on specs

Using double instead of stub, since stub is deprecated in rspec-mocks since https://github.com/rspec/rspec-mocks/843a40f4483be9888ba03a415468be99182f0b4a