Ports functionality of mock_model and stub_model from rspec-rails for developers using Mocha.