changed rspec syntax `stub` to `allow`

Changed RSpec syntax `stub` to `allow`.