What is a mock in RSpec? (Or a mock in general, because this isn’t a concept unique to Rspec.) A mock is an object used for testing. You use mocks to test the interaction between two objects. For example: You’re writing an API that flips images. Instead of writing your own image-manipulation code you use […]
The post How to Use RSpec Mocks (Step-By-Step Tutorial) appeared first on RubyGuides. Don't miss your free gift here :)