Replace 'stub' with 'double' as stub is deprecated in recent versions of rspec