Added stubbing that was missing in Rspec tests