Assert Multiple Differences in Minitest with assert_differences

There have been many times in my coding career that I've needed to test that multiple values change during an event.Maybe you want to check that a User, their Settings, and Posts all get deleted when a user removes their account. Technically you should be testing each of these individually, but in practice it's generally acceptable to make make multiple assertions per test as long as:The assertions are closely related in functionThe assertions are all simpleYou're consistent across your code base.
Assert Multiple Differences in Minitest with assert_differences #ruby #rubydeveloper #rubyonrails #minitest https://rubyonrails.ba/single/assert-multiple-differences-in-minitest-with-assert_differences

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles