Published on August 17, 2016. Updated on March 5, 2020. When writing tests for services, you may sometimes want to use mock objects instead of real objects. In case you’re using ActiveRecord and real objects, your tests may hit the database and slow down your suite. The latest release of the rspec-mocks opens a new window library bundled with RSpec 3 opens a new window includes at least three diff

