Use RSpec double syntax over stub to fix deprecation warning

Fixes warnings: `DEPRECATION: stub is deprecated. Use double instead.`