Added changes to switch from stubs to doubles as per RSpec updates.