Assert Multiple Differences in Minitest with assert_differences
02-Jun-2017 2767
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 #Assert #Multiple #Differences #Minitest #assert_differences #minitest https://rubyonrails.ba/link/assert-multiple-differences-in-minitest-with-assert_differences