logoalt Hacker News

jweirtoday at 7:03 PM0 repliesview on HN

We have some tests that ensure the interface is correct - that the correct type of args are passed say from a batch process to a mailer and a mail object is returned.

For these tests we don’t care about the content only that something didn’t get incorrectly set or the mailer interface changed.

Now if the developer changes the Mailer to require a user object the compiler tells us there is an error. Sorbet will error and say “hey you need to update your code here and here by adding a User object”

Before we would have had test coverage for that - or maybe not and missed the error.