← Back to Upcase

Isolated Unit Testing

Joe and Ben discuss the benefits and drawbacks of isolated unit testing. Additional reading: Mocks Aren't Stubs GOOS
This is a companion discussion topic for the original entry at https://thoughtbot.com/upcase/videos/isolated-unit-testing

One thing I was hoping would be touched on is the coupling to implementation that mocking can create, any thoughts?

At 8:45, line 18 I believe you should be injecting the mailing_list collaborator in addition to user?

Signup.new(user, mailing_list).create

Otherwise, the unit/system under test wouldn’t know what a mailing_list was in case anyone got confused by that.