RSpec Stubs The Object In Memory
Have you ever tested a method that pulls records out of the database and applied mocks to those records you just created in your test? Have you been surprised that the record does not appear to have the behavior you mocked out? I have an explanation of the situation for you and some options for how you can address it.
https://kevinjmurphy.com/posts/rspec-stubs-object-in-memory/
Post a comment