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 this commit got merged: https://github.com/rspec/rspec-mocks/commit/843a40f4483be9888ba03a415468be99182f0b4a