update for new api and rspec changes to stub and mock