Testing Objects with a Functional Mindset
21-Jan-2021 1195
When unit testing our Object-Oriented (OO) code, some methods are easy to test while others are hard. Functional programming gives us a mental model to help understand why: pure functions and side-effects.Easy testsSome methods are super easy to test. You set up an object, call the method, and expect a given result. This sort of test makes TDD a breeze.
Testing Objects with a Functional Mindset #ruby #rubydeveloper #rubyonrails #Testing #Objects #Functional #Mindset #testing https://rubyonrails.ba/link/testing-objects-with-a-functional-mindset