RubyConf 2021 - To mock, or not to mock? by Emily Giurleo

preview_player
Показать описание
To mock, or not to mock? by Emily Giurleo

Mocking: it’s one of the most controversial topics in the testing world. Using mocks, we can more easily test parts of our applications that might otherwise go untested, but mocks can also be misused, resulting in tests that are brittle or downright self-referential.

So… how do we know when to use mocks in our tests? In this talk, we’ll identify three important questions that can help us make that decision. By the end of the talk, you will have a framework in mind to help you answer the question: to mock, or not to mock?
Рекомендации по теме
Комментарии
Автор

That client pattern is a really clever one! Thanks for sharing

josemiguelochoa
Автор

I think the author is doing a fabulous job taking the watcher along for the ride and letting them have the same epiphanies.

But I also think there’s more places where mocking is necessary and beneficial and would encourage the reader of this comment to look up some of the talks by Sandi Metz about the magic rules for testing.

vosechu
Автор

Avoid time and money ? You don’t understand the computing business model, that’s for sure…

julian_handpan