RSpec Mocks and Stubs in Plain English
01-Feb-2019 2187
One of the most common questions I see from beginners to Rails testing is what mocks and stubs are and when to use them. If you’re confused about mocks and stubs, you’re not alone. In my experience very few people understand them. In this post I’ll attempt to help clarify the matter, particularly in the context of Rails/RSpec.I want to preface my explanation with a disclaimer. This post is partly derived from personal experience but it’s mostly derived from me just reading a bunch of posts online and reading a few.
RSpec Mocks and Stubs in Plain English #ruby #rubydeveloper #rubyonrails #RSpec #Mocks #Stubs #Plain #English #rspec https://www.rubyonrails.ba/link/rspec-mocks-and-stubs-in-plain-english